note 69199 added to function.is-numeric

From: Date: Sat, 26 Aug 2006 18:43:01 +0000
Subject: note 69199 added to function.is-numeric
Groups: php.notes 
Request: Send a blank email to php-notes+get-116368@lists.php.net to get a copy of this message
WARNING: This function returns TRUE if fed an empty string variable: $sValue = ""; if (ctype_digit ($sValue)) echo ("It's a number!"); else echo ("It's not a number!"); This script outputs "It's a Number" when a blank string should not be considered numeric. ---- Server IP: 64.71.164.2 Probable Submitter: 75.4.10.12 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.is-numeric.php Edit -- https://master.php.net/note/edit/69199 Del: integrated -- https://master.php.net/note/delete/69199/integrated Del: useless -- https://master.php.net/note/delete/69199/useless Del: bad code -- https://master.php.net/note/delete/69199/bad+code Del: spam -- https://master.php.net/note/delete/69199/spam Del: non-english -- https://master.php.net/note/delete/69199/non-english Del: in docs -- https://master.php.net/note/delete/69199/in+docs Del: other reasons-- https://master.php.net/note/delete/69199 Reject -- https://master.php.net/note/reject/69199 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116368) next »