3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_keys($_SERVER));
based on uDeku
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
array(21) { [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(17) "GLIBCPP_FORCE_NEW" [10]=> string(17) "GLIBCXX_FORCE_NEW" [11]=> string(18) "REQUEST_START_TIME" [12]=> string(12) "REQUEST_TIME" [13]=> string(18) "REQUEST_TIME_FLOAT" [14]=> string(13) "DOCUMENT_ROOT" [15]=> string(15) "SCRIPT_FILENAME" [16]=> string(11) "SCRIPT_NAME" [17]=> string(8) "PHP_SELF" [18]=> string(4) "argv" [19]=> string(4) "argc" [20]=> string(3) "PWD" }
Output for 5.2.3 - 5.3.29
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(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.0 - 5.0.5
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" }