3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "hello world"; echo explode(" ", $a)[0]; // prints hello function test() { return array("test" => array("foo" => "bar")); } echo test()['test']['foo']; // prints bar

preferences:
39.49 ms | 402 KiB | 5 Q