3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $GLOBALS = 'miauw'; $_SERVER = array(1, 2, 4, 6, 7, 8, 9, 112); function miauw() { var_dump($_SERVER, $GLOBALS, $GLOBALS['_SERVER']); } miauw();
Output for 5.4.0 - 7.1.0
Warning: Illegal string offset '_SERVER' in /in/OpqhN on line 8 array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } string(5) "miauw" string(1) "m"
Output for 5.0.0 - 5.3.29
array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } string(5) "miauw" string(1) "m"
Output for 4.3.2 - 4.4.9
array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } array(16) { ["argv"]=> array(1) { [0]=> string(9) "/in/OpqhN" } ["argc"]=> int(1) ["HTTP_POST_VARS"]=> array(0) { } ["_POST"]=> array(0) { } ["HTTP_GET_VARS"]=> array(0) { } ["_GET"]=> array(0) { } ["HTTP_COOKIE_VARS"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["HTTP_SERVER_VARS"]=> array(12) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" ["PHP_SELF"]=> string(0) "" ["argv"]=> array(1) { [0]=> string(9) "/in/OpqhN" } ["argc"]=> int(1) } ["_SERVER"]=> array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } ["HTTP_ENV_VARS"]=> array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } ["_ENV"]=> array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } ["HTTP_POST_FILES"]=> array(0) { } ["_FILES"]=> array(0) { } ["_REQUEST"]=> array(0) { } ["GLOBALS"]=> &string(5) "miauw" } array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) }
Output for 4.3.0 - 4.3.1
array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } array(14) { ["HTTP_POST_VARS"]=> array(0) { } ["_POST"]=> array(0) { } ["HTTP_GET_VARS"]=> array(1) { ["/in/OpqhN"]=> string(0) "" } ["_GET"]=> array(1) { ["/in/OpqhN"]=> string(0) "" } ["HTTP_COOKIE_VARS"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["HTTP_SERVER_VARS"]=> array(12) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" ["PHP_SELF"]=> string(0) "" ["argv"]=> array(1) { [0]=> string(9) "/in/OpqhN" } ["argc"]=> int(1) } ["_SERVER"]=> array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) } ["HTTP_ENV_VARS"]=> array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } ["_ENV"]=> array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } ["HTTP_POST_FILES"]=> array(0) { } ["_FILES"]=> array(0) { } ["_REQUEST"]=> array(1) { ["/in/OpqhN"]=> string(0) "" } ["GLOBALS"]=> &string(5) "miauw" } array(8) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(7) [5]=> int(8) [6]=> int(9) [7]=> int(112) }