We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The following code:
https://3v4l.org/BRBW9
<?php function &test(): int { $x = 0; try { return $x; } finally { $x = 'test'; } } $x = &test(); var_dump($x);
Resulted in this output:
string(4) "test"
But I expected this output instead:
Fatal error: Uncaught TypeError: test(): Return value must be of type int, string returned
PHP 7.0.2+
No response
The text was updated successfully, but these errors were encountered:
Naive guess that this might be from 778e5f3, which moved the finally handling to after the return type check
finally
Sorry, something went wrong.
No branches or pull requests
Description
The following code:
https://3v4l.org/BRBW9
Resulted in this output:
But I expected this output instead:
PHP Version
Operating System
No response
The text was updated successfully, but these errors were encountered: