> I'm wondering which is faster, eregi('[A-Z]',$variable); or
> ereg('A-Za-z',$variable);?

Well, you're not even matching the same thing, for one...

And, second, why not read this page, www.php.net/microtime so you can do
your own testing in the future?

They run about the same in my tests, assuming you're looking for
[a-zA-Z] in the second example. Even preg_match ran about the same

I'd recommend you do your own testing in your actual program though.
Generally, preg_* is faster than ereg* but it depends on what you're
actually doing.

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to