Re: [PATCH] removed Date_Calc dependency on PCRE
| From: | Stefan Walk | Date: | Sat, 19 Jul 2003 17:57:10 +0000 |
| Subject: | Re: [PATCH] removed Date_Calc dependency on PCRE | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18438@lists.php.net to get a copy of this message | ||
On Sat, Jul 19, 2003 at 07:33:47PM +0200, Roman Neuhauser wrote:
> 1. this was the only preg_*() call in the whole file
> 2. is_numeric() does the same job, even faster
It is not doing the /same/ job. something like "1.12" or ".1e3" will
pass through is_numeric and not through that preg_match... i'd use
ctype_digit, or if you don't want to use "new" functions, strspn to
check for that...
--
Regards,
Stefan Walk
<swalk@prp0.prp.physik.tu-darmstadt.de>