We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
function f() : int { return "hello"; } function g(array $x) {} g(1);
No warnings
Warning about return "hello", where "hello" doesn't match int return type of f Warning about g(1), where 1 doesn't match array argument type of g
return "hello"
"hello"
int
f
g(1)
1
array
g
PHP7 actually fails stage of execution of such code with uncaught TypeError. But with some exceptions:
function u(string $x) {} u(1)
It's executable without errors, but semantically may be not right
The text was updated successfully, but these errors were encountered:
@return
return
Will be tracked further in #1123.
Sorry, something went wrong.
No branches or pull requests
Code Example
Actual Behavior
No warnings
Expected Behavior
Warning about
return "hello"
, where"hello"
doesn't matchint
return type off
Warning about
g(1)
, where1
doesn't matcharray
argument type ofg
PHP7 actually fails stage of execution of such code with uncaught TypeError. But with some exceptions:
It's executable without errors, but semantically may be not right
The text was updated successfully, but these errors were encountered: