3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a' => 'val1', 'b' => array('c' => 68)); $stack = array($array); while (count($stack) !== 0) { foreach ($stack as $k0 => $v0) { foreach ($v0 as $k1 => $v1) { if (is_array($v1)) { $stack[] = $v1; } else { $$k1 = $v1; } unset($k1, $v1); } unset($stack[$k0], $k0, $v0); } } unset($stack); var_dump(array_slice(get_defined_vars(), -5));
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { ["argc"]=> int(1) ["_SERVER"]=> array(17) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIL"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["HOME"]=> string(4) "/tmp" ["PHP_SELF"]=> string(9) "/in/eSNaI" ["SCRIPT_NAME"]=> string(9) "/in/eSNaI" ["SCRIPT_FILENAME"]=> string(9) "/in/eSNaI" ["PATH_TRANSLATED"]=> string(9) "/in/eSNaI" ["DOCUMENT_ROOT"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1354626521.0001) ["REQUEST_TIME"]=> int(1354626521) ["argv"]=> array(1) { [0]=> string(9) "/in/eSNaI" } ["argc"]=> int(1) } ["array"]=> array(2) { ["a"]=> string(4) "val1" ["b"]=> array(1) { ["c"]=> int(68) } } ["a"]=> string(4) "val1" ["c"]=> int(68) }

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:
36.91 ms | 403 KiB | 8 Q