Good alternative to Eregi() in PHP
Posted
by Click Upvote
on Stack Overflow
See other posts from Stack Overflow
or by Click Upvote
Published on 2009-04-10T09:56:55Z
Indexed on
2010/04/12
11:53 UTC
Read the original article
Hit count: 403
I often find myself doing quick checks like this:
if (! eregi('.php',$fileName))
$filename.='.php';
But sadly eregi()
is going to be deprecated in PHP 6, which means all of my code that uses it will be rendered useless :(.
Is there another function that behaves exactly the same way as eregi()
? I don't know anything about reg exps and don't want to learn, so preg_match()
etc won't work for me.
© Stack Overflow or respective owner