3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_SERVER = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]; function miauw() { var_dump($_SERVER, $GLOBALS); } miauw();
Output for 7.0.0 - 7.1.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) } array(8) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/rSgsD" } ["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) } ["GLOBALS"]=> array(8) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/rSgsD" } ["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) } ["GLOBALS"]=> *RECURSION* } }
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) } array(12) { ["HTTP_RAW_POST_DATA"]=> NULL ["_REQUEST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/rSgsD" } ["_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) } ["_POST"]=> array(0) { } ["_GET"]=> array(0) { } ["argc"]=> int(1) ["GLOBALS"]=> array(12) { ["HTTP_RAW_POST_DATA"]=> NULL ["_REQUEST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/rSgsD" } ["_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) } ["_POST"]=> array(0) { } ["_GET"]=> array(0) { } ["argc"]=> int(1) ["GLOBALS"]=> *RECURSION* ["_SESSION"]=> array(0) { } ["_FILES"]=> array(0) { } ["_ENV"]=> array(14) { ["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) "/" ["GLIBCPP_FORCE_NEW"]=> string(1) "1" ["GLIBCXX_FORCE_NEW"]=> string(1) "1" ["HPHP"]=> int(1) ["HHVM"]=> int(1) ["HHVM_ARCH"]=> string(3) "x64" } } ["_SESSION"]=> array(0) { } ["_FILES"]=> array(0) { } ["_ENV"]=> array(14) { ["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) "/" ["GLIBCPP_FORCE_NEW"]=> string(1) "1" ["GLIBCXX_FORCE_NEW"]=> string(1) "1" ["HPHP"]=> int(1) ["HHVM"]=> int(1) ["HHVM_ARCH"]=> string(3) "x64" } }
Output for 5.4.0 - 5.6.28
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(8) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/rSgsD" } ["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) } ["GLOBALS"]=> *RECURSION* }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/rSgsD on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/rSgsD on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/rSgsD on line 3
Process exited with code 255.