funtion declared as function ReformatePhoneNumber($number), whose argument will contain string data representing some phone number data(entered by the user). A valid phone number may consist of between 7 and 12 digits (0,9). Assume that in between some adjacent digits there may optionally appear either a single space. or a single hypen(-) any other phone number should be considered invalid.
if the phone number is valid the return value of your funtion should contain a string containing betwwen 7 and 12 digits, representing the same phone number after removing all hyphens and spaces. if the phone number is invalid, throw a standard PHP5 exception intialized with the text "Invalid phone number"
Eg: After calling ReformatPhoneNumber('012-345 69') the return value should be '01234569'