You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a function signature with the first argument accepting null,
text that says that "The callback parameter may be bypassed by passing a null value"; and
an example with null as the first argument.
So, unless the documentation is out of date, this looks to be a regression in the ob_start function signature, most likely relating to changes in the way callables are handled in PHP 8.x.
Reproducing
Use the second example from the ob_start documentation, a one-liner:
Expected output: PHPStan should not report any errors.
Other
We're working on PHP 8.x support for our PHP code base. PHPStan is proving to be a valuable tool. Not sure how we managed to get by without it before. Thanks.
The text was updated successfully, but these errors were encountered:
Issue
PHPStan has started complaining for PHP 8.x when the first argument to
ob_start
($callback
) isnull
. See https://phpstan.org/r/1164573f-22b3-41fd-a678-bdd27058615b It reports:However, the documentation for
ob_start
on 23 June 2022 has:null
,null
as the first argument.So, unless the documentation is out of date, this looks to be a regression in the
ob_start
function signature, most likely relating to changes in the way callables are handled in PHP 8.x.Reproducing
Use the second example from the
ob_start
documentation, a one-liner:Implemented at https://phpstan.org/r/1164573f-22b3-41fd-a678-bdd27058615b
Expected output: PHPStan should not report any errors.
Other
We're working on PHP 8.x support for our PHP code base. PHPStan is proving to be a valuable tool. Not sure how we managed to get by without it before. Thanks.
The text was updated successfully, but these errors were encountered: