3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mysort($a,$b){ return strlen($b)-strlen($a); } $data = array("kaushik","kaushik is","kaushik is great","is","is great","great"); usort($data,'mysort'); // print_r($data); $current = ""; for($i=0;$i<count($data);$i++) { $current=$data[$i]; for($j=($i+1);$j<count($data);$j++) { $current=trim(str_replace($data[$j],"",$current)); } if ($current=="") { echo $i.":".$data[$i]."\n"; break; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
0:kaushik is great

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.77 ms | 401 KiB | 8 Q