[UPHPU] More if then fun...

David Smith davidsmith at byu.net
Wed Apr 28 21:22:10 MDT 2004


Matthew Frederico wrote:

>On Wed, 2004-04-28 at 14:32, Steve Dibb wrote:
>  
>
>>if ( ($k == "Website" || $k == "Email_Address") && $text !="")
>>    
>>
>
>Another fun way:
>if (preg_match('/Website|Email_Address/',$k) && $text)
>

Fun, but slow. :) preg_match() is generally much slower than "==" for 
string compares. Not noticable until you have to do a lot of them.

--Dave




More information about the UPHPU mailing list