Good alternative to Eregi() in PHP
- by Click Upvote
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.