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

Home » Imported messages » comp.lang.php » bug in is_numeric
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: bug in is_numeric [message #181364 is a reply to message #181332] Mon, 13 May 2013 20:15 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Sun, 12 May 2013 18:41:33 +0100, fred wrote:

> In article <kmocju$232o$1(at)yojimbo(dot)hack>, sal(at)yojimbo(dot)hack(dot)invalid
> says...
>> You are correct. That parameter, when passed to is_numeric(), should
>> return false. I tried it on Mac OS X and FreeBSD, but not on Windows.
>>
>> Could you try the following code and let me know what comes out?
>> <?php $a = is_numeric('x11.11c'); var_dump($a); ?>
>
> Hi sal
>
> OK I get false when I do that.
> "bool(false)" to be more precise.
> var_export($a)also reports false if thats any help.

OK, that tells us that on your computer and php version, the test:

is_numeric('x11.11c');

returns the boolean value FALSE, not the boolean value TRUE as you stated
earlier.

Note - you did the test on your computer using the exact same operating
system and php version that you are using.

So, the issue now is not that we are not using the exact same php / os,
but why you think that specific test is getting a TRUE when it's getting
a FALSE.

Personally, I'd guess that 'x11.11c' is not the value that's being tested
when it gives what you think is an unexpected TRUE.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[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
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
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
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
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
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
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem encrypting data (AES_ENCRYPT/AES_DECRYPT)
Next Topic: Debian: php fast-cgi along with mod_php
Goto Forum:
  

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

Current Time: Sat Nov 23 06:52:12 GMT 2024

Total time taken to generate the page: 0.03366 seconds