note 105522 added to function.is-int

From: Date: Wed, 24 Aug 2011 15:54:14 +0000
Subject: note 105522 added to function.is-int
Groups: php.notes 
Request: Send a blank email to php-notes+get-182701@lists.php.net to get a copy of this message
function int($test) { return preg_match("#^-?[0-9]*(\.0*)?$#" , $test); } this also accepts .0 notation example : 111.0000 or .000 (both are int - 111 and 0) ---- Server IP: 69.147.83.197 Probable Submitter: 188.26.196.184 ---- Manual Page -- http://www.php.net/manual/en/function.is-int.php Edit -- https://master.php.net/note/edit/105522 Del: integrated -- https://master.php.net/note/delete/105522/integrated Del: useless -- https://master.php.net/note/delete/105522/useless Del: bad code -- https://master.php.net/note/delete/105522/bad+code Del: spam -- https://master.php.net/note/delete/105522/spam Del: non-english -- https://master.php.net/note/delete/105522/non-english Del: in docs -- https://master.php.net/note/delete/105522/in+docs Del: other reasons-- https://master.php.net/note/delete/105522 Reject -- https://master.php.net/note/reject/105522 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182701) next »