Voting

: min(zero, five)?
(Example: nine)

The Note You're Voting On

andre dot roesti at 7flex dot net
14 years ago
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
?>

<< Back to user notes page

To Top