3v4l.org

run code in 150+ 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 Krt7n
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_TRYtry Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_CATCHcatch Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_FINALLYfinally Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be integer, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5
Output for 5.5.0 - 5.6.28
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_TRYtry Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_CATCHcatch Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_FINALLYfinally Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5
Output for 5.2.10 - 5.4.45
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_TRYtry Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_CATCHcatch Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGfinally Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5
Output for 5.0.4 - 5.2.9
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_TRYtry Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_CATCHcatch Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGfinally Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_TRYtry Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_CATCHcatch Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGfinally Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: e in /in/MTUjp on line 3 T_OPEN_TAG<?php T_STRINGtry Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGcatch Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGException T_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 T_STRINGfinally Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5 Warning: token_name() expects parameter 1 to be long, string given in /in/MTUjp on line 4 Notice: Uninitialized string offset: 1 in /in/MTUjp on line 5