Re: How do YOU set default function/method params?

From: Date: Tue, 06 Oct 2009 15:50:27 +0000
Subject: Re: How do YOU set default function/method params?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-298659@lists.php.net to get a copy of this message
Mert Oztekin wrote: > IMO, array_merge() is easy to use, however it suppose to use more cpu than other options. If > you are a performance freak, i suggest you to not choose array_merge() solution. (also you execute > date() and md5() functions even if you wont need to use them) > > In the other way, I think first option (with if() ones) seems more readable than other ones. > From a performance view, check out these numbers http://www.cmsws.com/examples/php/functions/speedtests/array_merge.php To see the source: http://www.cmsws.com/examples/php/functions/speedtests/array_merge.phps What a surprising difference in numbers!!!

« previous php.general (#298659) next »