3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a() { $minVal = null; $numArgs = func_num_args(); $argList = func_get_args(); for($ii=0; $ii<$numArgs; $ii++) { if(is_int($argList[$ii])) { if(is_null($minVal)) { $minVal = $argList[$ii]; } else { $minVal = ($minVal > $argList[$ii] ) ? $argList[$ii] : $minVal; } } } if(is_null($minVal)) { return 'no valid int passed in'; } return 'min int length is : '. $minVal; } echo a();
based on IWo51
Output for 4.3.0 - 7.2.0
no valid int passed in