3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $GLOBALS = 'miauw'; $_SERVER = array(1, 1, 2, 3, 5, 8, 13, 21, 34, 55); function miauw() { var_dump($_SERVER, $GLOBALS, $GLOBALS['_SERVER']); } miauw();
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal string offset '_SERVER' in /in/DCo4e on line 8 array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } string(5) "miauw" string(1) "m"
Output for hhvm-3.10.0 - 3.12.0
array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } string(5) "miauw" array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) }
Output for 5.0.0 - 5.3.29
array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } string(5) "miauw" string(1) "m"
Output for 4.3.2 - 4.4.9
array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } array(16) { ["argv"]=> array(1) { [0]=> string(9) "/in/DCo4e" } ["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/DCo4e" } ["argc"]=> int(1) } ["_SERVER"]=> array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } ["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(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) }
Output for 4.3.0 - 4.3.1
array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } array(14) { ["HTTP_POST_VARS"]=> array(0) { } ["_POST"]=> array(0) { } ["HTTP_GET_VARS"]=> array(1) { ["/in/DCo4e"]=> string(0) "" } ["_GET"]=> array(1) { ["/in/DCo4e"]=> 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/DCo4e" } ["argc"]=> int(1) } ["_SERVER"]=> array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) } ["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/DCo4e"]=> string(0) "" } ["GLOBALS"]=> &string(5) "miauw" } array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(5) [5]=> int(8) [6]=> int(13) [7]=> int(21) [8]=> int(34) [9]=> int(55) }