3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach(token_get_all("<?php try{}catch(Exception $e){}finally{}") as $tok) { echo token_name($tok[0]) . ": "; echo $tok[1] . "\n"; }
based on MTUjp
Output for 7.0.0 - 7.2.11
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_CATCH: catch Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_FINALLY: finally Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 5.5.24 - 5.6.28
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_CATCH: catch Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_FINALLY: finally Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 5.2.10 - 5.4.45
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_CATCH: catch Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: finally Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 5.0.4 - 5.2.9
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_CATCH: catch Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: finally Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_CATCH: catch Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: finally Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_STRING: try Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: catch Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 T_STRING: finally Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5