PHP is a bug factory

Suppose you unknowingly treat a string containing a formatted number, like "1,234.56" as if it were a real number. What would happen?

Common sense would say that PHP should do one of 2 things, either ignore the comma, or throw up its hands and complain about the number/string you've given it and, most importantly, stop.

However it doesn't do that, it simply ignores everything from the comma, so your 1,000,000 pounds becomes £1.
This can happen all too often if programmers abuse the number_format() function.

The purpose of number_format() is to print numbers in a nice way. Once you've called number_format() you should NEVER try to do number operations on the output. Unfortunately if the output is less than 1000.00 this will work fine. Then one day you will try to process an order for £1000 + VAT and disaster, you're suddenly asking your customer for £1.15 instead of £1,150.00. Many programmers abuse number_format() often using it when they should be calling round(). I have some sympathy for them, the problem is with PHP which should never try to do arithmetic with the output of number_format() OR should complain loudly if it does but should never, never just produce the wrong answer and continue blindly on its way.