3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($limit=10,$str=str_repeat(" ",$limit);$limit>=0;--$limit){ $arr=explode(" ",$str,$limit); $combined=implode(" ",$arr); if($combined !== $str){ throw new LogicException("implode() did not restore the original string. limit: {$limit}"); } }

preferences:
28.51 ms | 406 KiB | 5 Q