luminairex wrote in php

Very bizzare error

I just encountered the strangest error ever:

Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /home

The code in question:

...
else if(empty($password1) || empty($password2) || $password1 != $password2)
	$message = "Password field may not be empty, and both fields must match";
else if(ereg('[^A-Za-z0-9]', $fname) || empty($fname))
...


The interpreter indicated the error was on the line with eregi - swapping the function calls (switch eregi with empty) eliminated the error. I have no idea what might have caused the error or even what it means. Any clues? Thanks.