Will PHP type hinting decrease or increase the number of CPU instructions generated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From one side, type hinting assures that some variables of a certain type, so type checks can be eliminated at run time. This should produce less CPU instructions.

From the other side, type hinting will make PHP to make extra checks - i.e. that the values assigned are of the allowed type. This should produce more CPU instructions at runtime because PHP is not a statically typed and compiled language.

So, what is true? Is type hinting increasing or decreasing the number of CPU instructions generated?


Thanks,

Anton


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux