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
Suggestion: Remove "void" and "never" from Built-in types and put them in a seperate list Return-only types, outside the Atomic types section. Because both are not atomic types like int, string etc.
Void
Currently void is listed as an atomic type.
But void is not a type at all. It is a keyword checked at compile time.
There is no comparison possible if a function returned void.
functionVoidIsNotAType() : void
{
}
$ret = VoidIsNotAType();
var_dump(VoidIsNotAType());
// NULL// Comparison not possible, because VOID is not a type// if ($ret !== void) echo 'Not void'."\n";
functionUntypedVoidIsNotAType()
{
}
$ret = VoidIsNotAType();
var_dump(VoidIsNotAType());
// NULL// Comparison not possible, because VOID is not a type// if ($ret !== void) echo 'Not void'."\n";
Never
Currently never is listed as an atomic type.
But never is not a type at all. It is a keyword checked at compile time.
Activity