I often find myself doing quick checks like this:
if (!eregi('.php', $fileName)) {
$filename .= '.php';
}
But as eregi()
was deprecated in PHP 5.3 the code now throws errors.
Is there another function that behaves exactly the same way as eregi()
? I don't know anything about regexps and don't want to learn, so preg_match()
etc won't work for me.