Simple PHP unit conversion