- var_dump: documentation ( source)
- min: documentation ( source)
<?php
function which_is_lower($a, $b)
{
if ( $a < $b )
{
return $a;
}
else
{
return $b;
}
}
function compare_comparisons($a, $b)
{
echo 'min() gives:';
var_dump( min($a, $b) );
echo 'comparison with < gives:';
var_dump( which_is_lower($a, $b) );
}
echo '-1 vs NULL: ';
compare_comparisons(-1, NULL);