It means the function is old and not supposed to use anymore. I don’t remember the versions where this still was or where it was removed but thats probably the case. You should use preg_match. And instead of all ereg* functions there is usually preg_* function that you can use. You can use the i -modifier to get it work incase sensitive.
<?php
if (preg_match('/.jpg/i', $file))
?>