3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(token_get_all("<?php try{}catch(Exception $e){}finally{}") as $tok) { echo token_name($tok[0]) . ": "; echo $tok[1] . "\n"; }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Warning: Undefined variable $e in /in/agjsv on line 3 T_OPEN_TAG: <?php T_TRY: try Fatal error: Uncaught TypeError: token_name(): Argument #1 ($id) must be of type int, string given in /in/agjsv:4 Stack trace: #0 /in/agjsv(4): token_name('{') #1 {main} thrown in /in/agjsv on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
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 int, 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 int, 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 int, 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 int, 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 int, 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 int, 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 int, 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 int, string given in /in/agjsv on line 4 : Notice: Uninitialized string offset: 1 in /in/agjsv on line 5
Output for 7.3.32 - 7.3.33
T_OPEN_TAG: <?php T_TRY: try Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : T_CATCH: catch Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : T_STRING: Exception T_WHITESPACE: Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : T_FINALLY: finally Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 : Warning: token_name() expects parameter 1 to be int, string given in /in/agjsv on line 4 :
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
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.0 - 5.5.38, 5.6.0 - 5.6.40
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.2.17, 5.3.0 - 5.3.29, 5.4.0 - 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.0.5, 5.1.0 - 5.1.6, 5.2.0 - 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.3.11, 4.4.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

preferences:
386.45 ms | 405 KiB | 461 Q