3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_keys(get_defined_vars()));
Output for 5.4.0 - 5.6.26, 7.0.0 - 7.1.0
array(7) { [0]=> string(4) "_GET" [1]=> string(5) "_POST" [2]=> string(7) "_COOKIE" [3]=> string(6) "_FILES" [4]=> string(4) "argv" [5]=> string(4) "argc" [6]=> string(7) "_SERVER" }
Output for hhvm-3.10.0 - 3.13.2
array(12) { [0]=> string(7) "GLOBALS" [1]=> string(18) "HTTP_RAW_POST_DATA" [2]=> string(7) "_COOKIE" [3]=> string(4) "_ENV" [4]=> string(6) "_FILES" [5]=> string(4) "_GET" [6]=> string(5) "_POST" [7]=> string(8) "_REQUEST" [8]=> string(7) "_SERVER" [9]=> string(8) "_SESSION" [10]=> string(4) "argc" [11]=> string(4) "argv" }
Output for 5.0.0 - 5.3.29
array(16) { [0]=> string(7) "GLOBALS" [1]=> string(4) "_ENV" [2]=> string(13) "HTTP_ENV_VARS" [3]=> string(4) "argv" [4]=> string(4) "argc" [5]=> string(5) "_POST" [6]=> string(14) "HTTP_POST_VARS" [7]=> string(4) "_GET" [8]=> string(13) "HTTP_GET_VARS" [9]=> string(7) "_COOKIE" [10]=> string(16) "HTTP_COOKIE_VARS" [11]=> string(7) "_SERVER" [12]=> string(16) "HTTP_SERVER_VARS" [13]=> string(6) "_FILES" [14]=> string(15) "HTTP_POST_FILES" [15]=> string(8) "_REQUEST" }
Output for 4.3.2 - 4.4.9
array(15) { [0]=> string(4) "argv" [1]=> string(4) "argc" [2]=> string(14) "HTTP_POST_VARS" [3]=> string(5) "_POST" [4]=> string(13) "HTTP_GET_VARS" [5]=> string(4) "_GET" [6]=> string(16) "HTTP_COOKIE_VARS" [7]=> string(7) "_COOKIE" [8]=> string(16) "HTTP_SERVER_VARS" [9]=> string(7) "_SERVER" [10]=> string(13) "HTTP_ENV_VARS" [11]=> string(4) "_ENV" [12]=> string(15) "HTTP_POST_FILES" [13]=> string(6) "_FILES" [14]=> string(8) "_REQUEST" }
Output for 4.3.0 - 4.3.1
array(13) { [0]=> string(14) "HTTP_POST_VARS" [1]=> string(5) "_POST" [2]=> string(13) "HTTP_GET_VARS" [3]=> string(4) "_GET" [4]=> string(16) "HTTP_COOKIE_VARS" [5]=> string(7) "_COOKIE" [6]=> string(16) "HTTP_SERVER_VARS" [7]=> string(7) "_SERVER" [8]=> string(13) "HTTP_ENV_VARS" [9]=> string(4) "_ENV" [10]=> string(15) "HTTP_POST_FILES" [11]=> string(6) "_FILES" [12]=> string(8) "_REQUEST" }