General Community > Scripting Help
regex question
Metho:
Just because I'm curious now, in what kind of situation would preg_replace be slower than ereg_replace, if ever?
Methonis
Zef Hemel:
I think preg is always faster, but I never really tested.
Metho:
Hmm, okies. Just wondering because on php.net in the ereg_replace() help it says that OFTEN preg_replace() was faster, so I was just curious if there were actually any times when it wouldn't be. (As I see preg_replace 99.99% of the time, and every once in a while will see ereg_replace)
Thanks,
Methonis
[Unknown]:
Ereg syntax can be clearer, but the engine behind it is less optimized and slower so it is almost always worse.
-[Unknown]
Metho:
Got it, thanks. ;)
Methonis
Navigation
[0] Message Index
[#] Next page
Go to full version