note 99098 added to function.is-int

From: Date: Tue, 27 Jul 2010 12:51:07 +0000
Subject: note 99098 added to function.is-int
Groups: php.notes 
Request: Send a blank email to php-notes+get-171172@lists.php.net to get a copy of this message
With this function you can check if every of multiple variables are int. This is a little more comfortable than writing 'is_int' for every variable you've got. <?php function are_int ( ) { $args = func_get_args (); foreach ( $args as $arg ) if ( ! is_int ( $arg ) ) return false; return true; } // Example: are_int ( 4, 9 ); // true are_int ( 22, 08, 'foo' ); // false ?> ---- Server IP: 69.147.83.197 Probable Submitter: 178.83.250.151 ---- Manual Page -- http://www.php.net/manual/en/function.is-int.php Edit -- https://master.php.net/note/edit/99098 Del: integrated -- https://master.php.net/note/delete/99098/integrated Del: useless -- https://master.php.net/note/delete/99098/useless Del: bad code -- https://master.php.net/note/delete/99098/bad+code Del: spam -- https://master.php.net/note/delete/99098/spam Del: non-english -- https://master.php.net/note/delete/99098/non-english Del: in docs -- https://master.php.net/note/delete/99098/in+docs Del: other reasons-- https://master.php.net/note/delete/99098 Reject -- https://master.php.net/note/reject/99098 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171172) next »