note 104656 added to function.is-int

From: Date: Wed, 29 Jun 2011 04:46:15 +0000
Subject: note 104656 added to function.is-int
Groups: php.notes 
Request: Send a blank email to php-notes+get-181028@lists.php.net to get a copy of this message
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 ); } ?> ---- Server IP: 89.31.146.176 Probable Submitter: 202.87.134.18 ---- Manual Page -- http://www.php.net/manual/en/function.is-int.php Edit -- https://master.php.net/note/edit/104656 Del: integrated -- https://master.php.net/note/delete/104656/integrated Del: useless -- https://master.php.net/note/delete/104656/useless Del: bad code -- https://master.php.net/note/delete/104656/bad+code Del: spam -- https://master.php.net/note/delete/104656/spam Del: non-english -- https://master.php.net/note/delete/104656/non-english Del: in docs -- https://master.php.net/note/delete/104656/in+docs Del: other reasons-- https://master.php.net/note/delete/104656 Reject -- https://master.php.net/note/reject/104656 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181028) next »