Q:

floatval causes the digits after the thousand sep ',' to be erased

floatval('19500.00');

returns 19500 ; 
however 
echo floatval('19,500.00');

returns 19 ; 
this could've really given me a big problem it was good that I've noticed :D ... is there some reason for that behavior or it's just a bug ... should all values be number_formatted before ouput?

A:

You put that value in single quotes, so it's not treated as a numerical value, but as a string.
Here's php.net's explanation what happens to strings with floatval (from http://php.net/manual/en/function.floatval.php):

Strings will most likely return 0 although this depends on the
  leftmost characters of the string.

Meaning: The leftmost characters of the string in your case is 19 - that's a numerical value again, so the output is 19. 

