clipped from: bitfilm.net   
5. str_replace() vs. ereg_replace() and preg_replace()

ereg_replace(): 26.65647 seconds
preg_replace(): 25.18324 seconds
str_replace(): 10.26872 seconds
clipped from: bitfilm.net   
6. Pre-increment is faster than post-increment

Post-increment: 2.148 seconds
Pre-increment: 1.692 seconds

++$var;


$var++;


7. Regular Expressions for input validation?

Regular Expressions: 2.401 seconds
ctype_digit: 0.985 seconds

8. split() or explode()

split(): 5.453 seconds
explode(): 3.556 seconds

9. Use time() rather than date('U')

date('U'): 19.162 seconds
time(): 0.057 seconds

10. Fastest type of loop

while(++$a<100000000){}: 15.519 seconds
for(;++$a<100000000;){}: 17.577 seconds
do{}while(++$a<100000000): 13.744 seconds
clipped from: bitfilm.net   
11. is_numeric() vs. ctype_digit()

is_numeric(): 9.943268 seconds
ctype_digit(): 11.801991 seconds

14. === (Identical) vs. == (Equal)

==: 4.194739 seconds
===: 3.510191 seconds

15. intval('100') vs. (int)'100'

intval('100'): 6.441137 seconds
(int)'100': 2.933663 seconds