-
Notifications
You must be signed in to change notification settings - Fork 7.8k
var_dump() $return like print_r to allow using it in ob_start() callbacks without fatal #18340
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
Comments
One of the problems with giving |
Oh right, how about a new |
@kkmuffme : That's literally |
It's not, the output of var_export and var_dump are completely different. |
That would require an RFC. |
interessting.. never seen this error.. are more functions then edit: ohh I see.. the problem is not |
Description
Will result in:
When using:
it works without error (now, this wasn't the case in earlier PHP versions where it had the same issue as can be seen
in the old docs php/doc-en@e8f4c44#diff-a18323268abbc44bce515215167dfae5d0fb378c63ea36bea0f6e537a6a0114aL115)
What's the reason why print_r with return (which uses buffering internally) can be called in an ob callback now, but ob_start still can't?
Anyway though - given this,
var_dump
should have a 2nd argument $return to allow returning, so it can be used in ob_start callbacks, where ob_start cannot be used to get it's valueThe text was updated successfully, but these errors were encountered: