FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » FILTER_SANITIZE_NUMBER_FLOAT non/sense
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: FILTER_SANITIZE_NUMBER_FLOAT non/sense [message #177015 is a reply to message #177014] Thu, 16 February 2012 12:34 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 16.02.2012 12:53, schrieb Thomas Mlynarczyk:
> Michael Fesser schrieb:
>
>>>> $ php -r "echo filter_var('456,999', FILTER_SANITIZE_NUMBER_FLOAT,
>>>> FILTER_FLAG_ALLOW_THOUSAND);"
>>>> 456,999
>>> Hm, it is still messed up, in the default setup it eats points and commas.
>> Correct. [...]
>
> I consider this a very strange definition of "correct". The point (pun intended) of
> floats is precisely to be able to have a decimal point. It is absolutely ridiculous
> to filter that out by default. Do you have to explicitly allow "@" when filtering
> e-mail addresses?
>
--cut

> Greetings,
> Thomas

I read this as "correct, it is messed up".

So we seem to agree this is ridiculous and unusable.

I wondered if there was some hidden secret - none so far.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to start external PHP file from HTML?
Next Topic: DOMDocument HTML problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:41:39 GMT 2024

Total time taken to generate the page: 0.03154 seconds