note 105522 deleted from function.is-int by danbrown

From: Date: Wed, 24 Aug 2011 16:00:08 +0000
Subject: note 105522 deleted from function.is-int by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182702@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- 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)

« previous php.notes (#182702) next »