On Thu, 5 Jun 2008, Mark Wu wrote: > I don't think type casting is ambiguous, anyway, it is personal choice. How confident are you that a cast eliminates everything except an integer? (hint, you shouldn't be very confident at all) How confident are you that a preg_replace("/[^0-9]/", "") does the job? 100%.