PHP/type declaration

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PHP
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Notes

What was once called "type-hinting" in PHP is now, for some reason, called "type declaration".

Official pages about type declaration:

Note that the "nullable" syntax ("?<type>") only works in PHP 7.1 and up, not in 7.0.