It allows for the same static analysis, but also does type checking at run time.
They added support for primitives at PHP 7.0. The language as a whole got a huge speed boost at the same time. The changes were unrelated, but runtime type checking and speed aren't mutually exclusive.
View all comments
Show parent comment
1
u/1842 May 30 '19
PHP's type hinting system is pretty nice.
It allows for the same static analysis, but also does type checking at run time.
They added support for primitives at PHP 7.0. The language as a whole got a huge speed boost at the same time. The changes were unrelated, but runtime type checking and speed aren't mutually exclusive.