Re: regexps

From: Date: Tue, 28 Jan 2003 18:10:50 +0000
Subject: Re: regexps
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133406@lists.php.net to get a copy of this message
>using any of the string functions on the output would ofcourse > cause a performance drawback (do you agree with me?), i had > used a combination of string functions to do instead of regexps, > which one will be faster as you think ? Hi, i made some basic bench and see that it really depends... try to make some basic search like ^[0-9]{1,4}$ how can u do this ? with substr, strlen, strstr and ifthenelse ? i found really faster to use preg_match(), which is really faster than if (ereg())...

« previous php.general (#133406) next »