Tag Archives: Type

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