3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MyArray() { return array('de'=>array('eins','zwei','drei')); } // based on feature request for PHP3, nine years ago, per https://bugs.php.net/bug.php?id=2341 // bug refiled from version 3 to version 4 // but Sterling Hughes felt the 'WTF' factor was too high to have it fixed // now should work in PHP5.5 $arr1DE=myArray()['de']; $arr2DE=array('de'=>array('eins','zwei','drei'))['de']; var_dump($arr1DE, $arr2DE);

preferences:
38.11 ms | 402 KiB | 5 Q