Tag Archives: Casting

PHP: Compare vs. Calculating (2/2)

A comment by Thomas Scholz in my (that time one-parted) PHP: Compare vs. Calculating post made me to take a reprise on the comparison.

Posted in Pressed | Tagged , , , | Leave a comment

PHP: Compare vs. Calculating (1/2)

This speed comparison test I’ve made is not of that much interest, but it shows somehow when / how optimization takes place. Those “performance” test are most likely not that valuable for optimizations but to better know the language. I … Continue reading

Posted in Hacking The Core, Pressed | Tagged , , , , , | 3 Comments

PHP: Casting vs. intval()

Doing a cast like (int) $var instead of the intval($var) function is about 300% to 650% faster. I did some tests out of curiousity in #13317 and those are the results:

Posted in Hacking The Core, Pressed, The Know Your Language Department | Tagged , , , , , , , , | 19 Comments