[0-9]{4}-[0-9]{4}$ is only going to find numbers in the format ####-####. That is, four numbers followed by a dash and then four more numbers. Further, the $ at the end is going to check to see if the ####-#### is at the END of the string... and he wants to find phone numbers no matter where they are in the string.
The first thing you need to do is decide how you define a phone number. In your example, you showed 5551427. Are you saying that anytime there are 7 numbers in a row, you're going to assume it's a phone number? Personally, I would look for these formats:
555-1212
201-555-1212
(201) 555-1212
1-201-555-1212
That list should catch most phone numbers in the United States. If you are going to look for seven numbers in a row, that might match lots of other things besides phone numbers. If you are going to try to match those four samples, then these lines should work for you:
$phone = ereg_replace("([0-9]{3}) [0-9]{3}-[0-9]{4}","(xxx) xxx-xxxx",$phone);
$phone = ereg_replace("[0-9]{3}-[0-9]{3}-[0-9]{4}","xxx-xxx-xxxx",$phone);
$phone = ereg_replace("1-[0-9]{3}-[0-9]{3}-[0-9]{4}","1-xxx-xxx-xxxx",$phone);
$phone = ereg_replace("[0-9]{3}-[0-9]{4}","xxx-xxxx",$phone);