-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
bad work in closure with null argument #35
Comments
Indeed, this is a bug, thanks for reporting it! Full reproduce: namespace Project\Controllers;
use Brick\VarExporter\VarExporter;
require 'vendor/autoload.php';
$function = function (string|array|null $values): string|null {
return null;
};
$fn = fn (string|array|null $values): string|null => null;
echo VarExporter::export($function), "\n";
echo VarExporter::export($fn), "\n"; Expected output:
Actual output:
Maybe @jasny could help? |
This seems to be a bug in https://github.com/nikic/PHP-Parser. We need to open an issue there. |
Thanks for taking a look, @jasny! Do you want to take care of it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when i use code
and $array is :
response is : [ function (string|array|\Projects\Controllers\null $values) ]
The text was updated successfully, but these errors were encountered: