php8-type-system icon indicating copy to clipboard operation
php8-type-system copied to clipboard

PHP types are not type hints but type declarations

Open Girgias opened this issue 2 years ago • 1 comments

PHP enforces types at runtime so they are not hints but actual proper declarations.

The PHP manual also refers to them as type declarations.

Girgias avatar Mar 17 '22 01:03 Girgias

I agree with the term "type declaration" of course, but don't we call them "typehint" all the time ?

At least in userland space I have the feeling we always use "typehint" instead of "type declaration".

And personally that is what I have always ever called them.

florentpoujol avatar Mar 20 '22 20:03 florentpoujol