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

Top 10 most expensive operations 

These are the most expensive operations in this test (by time)
  1. file_put_contents()
  2. opendir() readdir() closedir()
  3. scandir()
  4. fopen() fread() fclose()
  5. memcache->get()
  6. memcache->set()
  7. implode('\n', file())
  8. include()
  9. include_once()
  10. file_get_contents()
These are the biggest time savers (per call)
  1. xcache_set() vs. file_put_contents()
  2. xcache_get() vs. memcache->get()
  3. xcache_set() vs. memcache->set()
  4. file_get_contents() vs. fopen(), fread(), fclose()
  5. file_get_contents() vs. implode('\n', file())
  6. include(relative) vs. include(full_path)
  7. require_once() vs. include()
  8. scandir() vs. opendir() readdir() closedir()
  9. static method vs. call_user_func()
  10. preg_match(/regex/i) vs. eregi(regex)
Discuss this article on the forums. (2 posts)


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