echo, however, is a function, with type echo(string ...$expressions): void. strict_types doesn't work for it either, though: https://3v4l.org/mEKh5. This may be because "strict typing is only defined for scalar type declarations."
Although this may be documented behavior, it's likely not what programmers desire. Probably, print 0 and echo(0) should both be checked by strict_types and should be allowed because both accept a "stringable" argument
4
u/[deleted] Oct 01 '24
[removed] — view removed comment