3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function sort($a,$b){ return strlen($b)-strlen($a); } $data = array("kaushik","kaushik is","kaushik is great","is","is great","great"); usort($data,'sort'); $current = ""; for($i=0;$i<count($data);$i++) { $current=$data[$i]; for($j=$i+1;$j<count($data);$i++) { $current=str_replace($data[$j],"",$current); } if ($current=="") { echo $current."\n"; } } ?>
Output for 5.0.0 - 5.4.26
Fatal error: Cannot redeclare sort() in /in/HDOLA on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot redeclare sort() in /in/HDOLA on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot redeclare sort() in /in/HDOLA on line 2