One thing I often see when re-factoring PHP applications, is the improper use of the method_exists() function, and I think this needs a little bit of clarification.
(more…)
Blog
Archive for the ‘php’ Category
method_exists() vs. is_callable()
Sunday, January 3rd, 2010Tags: php, tips
Posted in php5, tips and tricks | 4 Comments »
Improving performance with return values caching
Wednesday, February 4th, 2009Many functions (and methods) in a project will often provide the same return value for the same arguments, like:
- mathematical functions:
function SomeMaths($x)
{
return $x + pow($x, 3.2) - cos($x);
}
- functions which retrieve content from a file:
Tags: caching, how-to, optimization, php, profiling
Posted in concepts and principles, design patterns, php, tips and tricks | 5 Comments »
-
You are currently browsing the archives for the php category.
Archives
Categories
- concepts and principles (1)
- OOP (1)
- design patterns (1)
- php (2)
- php5 (1)
- tips and tricks (4)
- tools (2)
powered by WordPress
