Snipplrhttp://snipplr.com/tags/strcmp
Recent snippets posted on Snipplr.comen-usMon, 03 Aug 2015 06:31:47 GMT(PHP) Speed Test: strcmp vs === - mthornhttp://snipplr.com/view/758/speed-test-strcmp-vs-/
strcmp with matching strings took 0.207852 seconds
strcmp with non-matching strings took 0.215276 seconds
=== with matching strings took 0.067122 seconds
=== with non-matching strings took 0.057305 seconds
=== is the clear winner. Function calls are always slower than operators. This was with PHP5, may be different for earlier versions. Not sure about the memory impact but I assume it's less since the strings do not have to be copied for the function call. ]]>Wed, 09 Aug 2006 09:23:15 GMThttp://snipplr.com/view/758/speed-test-strcmp-vs-/