Blog

Posts Tagged ‘php’

method_exists() vs. is_callable()

Sunday, January 3rd, 2010

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…)

Improving performance with return values caching

Wednesday, February 4th, 2009

Many 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:

(more…)

powered by WordPress