Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Sun, 12 May 2013 17:55:19 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: bug in is_numeric References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <7kq46a-cfm.ln1@luuk.invalid.lan> Lines: 40 NNTP-Posting-Host: 2001:980:9089:1:216:76ff:fee1:aa6c X-Trace: 1368374401 news.xs4all.nl 15981 [2001:980:9089:1:216:76ff:fee1:aa6c]:37178 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.php:9266 On 12-05-2013 17:31, Salvatore wrote: > On 2013-05-12, fred wrote: >> Using PHP 5.3.6 on win7-74 >> >> if(is_numeric('x11.11c') returns TRUE >> and variations eg: z1111x is also true >> >> this does not seem right to me. >> I've done a search but cant find mention in buglist. >> >> Perhaps someone more knowledgable can deal with this. >> I've tried to mention elsewhere but PHP.net seems to be going >> out of its way to make life impossible >> > > 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? > > > > C:\temp>ver Microsoft Windows [Version 6.1.7601] C:\temp>php -v PHP 5.4.13 (cli) (built: Mar 15 2013 02:07:14) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies C:\temp>type test.php C:\temp>php test.php bool(false) C:\temp>