3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $code =<<<PHP_CODE <?php function test($a) { echo $a; } $a = 10; test($a); PHP_CODE; $tokens = token_get_all($code); ; foreach ($tokens as $row) { if (is_numeric($row[0])) { echo token_name($row[0]), "\r\n"; } }
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: a in /in/QalSu on line 5 Notice: Undefined variable: a in /in/QalSu on line 6 Notice: Undefined variable: a in /in/QalSu on line 9 Notice: Undefined variable: a in /in/QalSu on line 10 T_OPEN_TAG T_FUNCTION T_WHITESPACE T_STRING T_WHITESPACE T_WHITESPACE T_ECHO T_WHITESPACE T_WHITESPACE T_WHITESPACE T_WHITESPACE T_LNUMBER T_WHITESPACE T_STRING
Output for 5.2.3 - 5.6.28
Notice: Undefined variable: a in /in/QalSu on line 6 Notice: Undefined variable: a in /in/QalSu on line 9 Notice: Undefined variable: a in /in/QalSu on line 10 Notice: Undefined variable: a in /in/QalSu on line 10 T_OPEN_TAG T_FUNCTION T_WHITESPACE T_STRING T_WHITESPACE T_WHITESPACE T_ECHO T_WHITESPACE T_WHITESPACE T_WHITESPACE T_WHITESPACE T_LNUMBER T_WHITESPACE T_STRING
Output for 5.0.4 - 5.2.2
Notice: Undefined variable: a in /in/QalSu on line 5 Notice: Undefined variable: a in /in/QalSu on line 7 Notice: Undefined variable: a in /in/QalSu on line 9 Notice: Undefined variable: a in /in/QalSu on line 11 T_OPEN_TAG T_FUNCTION T_WHITESPACE T_STRING T_WHITESPACE T_WHITESPACE T_ECHO T_WHITESPACE T_WHITESPACE T_WHITESPACE T_WHITESPACE T_LNUMBER T_WHITESPACE T_STRING
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: a in /in/QalSu on line 5 Notice: Undefined variable: a in /in/QalSu on line 7 Notice: Undefined variable: a in /in/QalSu on line 9 Notice: Undefined variable: a in /in/QalSu on line 11 T_OPEN_TAG T_FUNCTION T_WHITESPACE T_STRING T_WHITESPACE T_WHITESPACE T_ECHO T_WHITESPACE T_WHITESPACE T_WHITESPACE T_WHITESPACE T_LNUMBER T_WHITESPACE T_STRING