note 104656 deleted from function.is-int by danbrown

From: Date: Wed, 29 Jun 2011 15:38:17 +0000
Subject: note 104656 deleted from function.is-int by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-181057@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- to Roberto Rama http://fr.php.net/manual/fr/function.is-int.php#92370 Be careful: isint('') returns true; In your regexp, I just replace * by + <?php function isint( $mixed ) { return ( preg_match( '/^\d+$/' , $mixed) == 1 ); } ?>

« previous php.notes (#181057) next »