| 
 
52 PHP Programming Tips
Article Index
52 PHP Programming Tips
Variable Operations
Functions And Methods
Storage
MISC Functions
Top 10 list

MISC Functions

General Functions

  • if elseif else is 0.78 % faster than switch
  • @Error supression is 235% slower than without
  • $_SERVER['REQUEST_TIME'] is 59% faster than time()
  • min(array) is 16% faster than min(int, int)
  • require_once() is 24% faster than include()
  • require_once() is just as fast as include_once()
  • include(relative path) is 37% faster than include(full path)

Regular Expressions

  • str_replace() is 40% faster than preg_replace()
  • ereg('regex') is 17% faster than preg_match('/regex/')
  • preg_match('/regex/i') is 68% faster than eregi('regex')



 
Next >
feed image
Copyright 2007 Anthony Ferrara, All Rights Reserved