3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function GetLongestString() { $args = func_get_args(); $max = 0; $str = ""; foreach($args as $arg) { if(strlen($arg) > $max) { $str = $arg; } } return $str; } print GetLongestString("a", "bcd", "efgh", "ij", "") ;
Output for 4.3.0 - 7.1.0
ij