3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_map('array_keys', compact( '_ENV', '_GET', '_POST', '_COOKIE', '_SERVER' )));
Output for 5.4.0 - 7.1.0
array(4) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_SERVER"]=> array(18) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" [9]=> string(8) "PHP_SELF" [10]=> string(11) "SCRIPT_NAME" [11]=> string(15) "SCRIPT_FILENAME" [12]=> string(15) "PATH_TRANSLATED" [13]=> string(13) "DOCUMENT_ROOT" [14]=> string(18) "REQUEST_TIME_FLOAT" [15]=> string(12) "REQUEST_TIME" [16]=> string(4) "argv" [17]=> string(4) "argc" } }
Output for 5.2.3 - 5.3.29
array(5) { ["_ENV"]=> array(9) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" } ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_SERVER"]=> array(17) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" [9]=> string(8) "PHP_SELF" [10]=> string(11) "SCRIPT_NAME" [11]=> string(15) "SCRIPT_FILENAME" [12]=> string(15) "PATH_TRANSLATED" [13]=> string(13) "DOCUMENT_ROOT" [14]=> string(12) "REQUEST_TIME" [15]=> string(4) "argv" [16]=> string(4) "argc" } }
Output for 5.1.0 - 5.2.2
array(5) { ["_ENV"]=> array(9) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" } ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_SERVER"]=> array(13) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" [9]=> string(8) "PHP_SELF" [10]=> string(12) "REQUEST_TIME" [11]=> string(4) "argv" [12]=> string(4) "argc" } }
Output for 4.3.2 - 5.0.5
array(5) { ["_ENV"]=> array(9) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" } ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_SERVER"]=> array(12) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" [9]=> string(8) "PHP_SELF" [10]=> string(4) "argv" [11]=> string(4) "argc" } }
Output for 4.3.0 - 4.3.1
array(5) { ["_ENV"]=> array(9) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" } ["_GET"]=> array(1) { [0]=> string(9) "/in/7J896" } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_SERVER"]=> array(12) { [0]=> string(4) "TERM" [1]=> string(4) "PATH" [2]=> string(4) "LANG" [3]=> string(5) "SHELL" [4]=> string(4) "MAIN" [5]=> string(7) "LOGNAME" [6]=> string(4) "USER" [7]=> string(8) "USERNAME" [8]=> string(4) "HOME" [9]=> string(8) "PHP_SELF" [10]=> string(4) "argv" [11]=> string(4) "argc" } }