Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_response_header missing #415

Open
diversen opened this issue Mar 17, 2023 · 1 comment
Open

http_response_header missing #415

diversen opened this issue Mar 17, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@diversen
Copy link

Great library, thanks 👍

When using safe functions you lose access to $http_response_header.
$http_response_header is created in the local scope.

I guess there is no fix for this? I could not find anything about this issue after searching a bit.

<?php

require_once "vendor/autoload.php";

use function Safe\file_get_contents;

file_get_contents("https://google.com");
var_dump($http_response_header);

// -> Warning: Undefined variable $http_response_header in ...

It is the same with e.g. fopen.

@shish shish added the enhancement New feature or request label Feb 3, 2025
@shish
Copy link
Collaborator

shish commented Feb 3, 2025

This is some horrible PHP magic and I'm not sure how to emulate it, but keeping the issue open mostly to keep track of it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants