In PHP 7 you have static typing out of the box no need tho Hack ;-)
Robert M
12

This is not truth at all, PHP is not and will never be statically typed. All is in zvals and that will not change.

Variables cannot have static types also parameters not. There is type declaration(aka. type hinting). However you can have an int $foo as parameter and assign “hello” to it, because it is dynamic.

Like what you read? Give Ricardo Sánchez a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.