note 49186 deleted from function.ereg by tularis
| From: | tularis@php.net | Date: | Wed, 19 Jan 2005 11:26:39 +0000 |
| Subject: | note 49186 deleted from function.ereg by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83618@lists.php.net to get a copy of this message | ||
Note Submitter: arnico at c4 dot lv
Reason: spam
----
Sometimes for faster script, better is to use "ereg" not "preg"!
I have tested both functions and result is :
Yes, ereg is slower than preg, but what happens when function did not found any matches?! Then ereg
is fast, but preg is doing something big and is much more slower.
So when writing script you need to check vhere is small posible to found match.
For example in testing user posted data you can use ereg and this will be very fast for user who
posts "good data", but for bad peoples it will be slower :)
P.S. sorry about my bad English