3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = array(1, 1, 2, 3, 5, 8); $arr = get_defined_vars(); // print $b print_r($arr["b"]); /* print path to the PHP interpreter (if used as a CGI) * e.g. /usr/local/bin/php */ echo $arr["_"]; // print the command-line parameters if any print_r($arr["argv"]); // print all the server vars print_r($arr["_SERVER"]); // print all the available keys for the arrays of variables print_r(array_keys(get_defined_vars())); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 3 [4] => 5 [5] => 8 ) Warning: Undefined array key "_" in /in/J69ig on line 11 Array ( [0] => /in/J69ig ) Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/J69ig [SCRIPT_NAME] => /in/J69ig [SCRIPT_FILENAME] => /in/J69ig [PATH_TRANSLATED] => /in/J69ig [DOCUMENT_ROOT] => [REQUEST_TIME_FLOAT] => 1471282700.0001 [REQUEST_TIME] => 1471282700 [argv] => Array ( [0] => /in/J69ig ) [argc] => 1 ) Array ( [0] => _GET [1] => _POST [2] => _COOKIE [3] => _FILES [4] => argv [5] => argc [6] => _SERVER [7] => b [8] => arr )

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