3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = <<<'code' <?php function system_update_10101(&$sandbox = NULL) { } code; $tokens = token_get_all($source, TOKEN_PARSE); foreach ($tokens as $token) { if (is_array($token)) { echo token_name($token[0]) , PHP_EOL; } } var_dump($tokens[2]); var_dump($tokens[4]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/SX0rT
function name:  (null)
number of ops:  27
compiled vars:  !0 = $source, !1 = $tokens, !2 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fphp%0A%0Afunction++++++++system_update_10101%28%26%24sandbox+%3D+NULL%29+%7B%0A%7D%0A'
   11     1        INIT_FCALL                                               'token_get_all'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   13     6      > FE_RESET_R                                       $6      !1, ->17
          7    > > FE_FETCH_R                                               $6, !2, ->17
   14     8    >   TYPE_CHECK                                  128          !2
          9      > JMPZ                                                     ~7, ->16
   15    10    >   INIT_FCALL                                               'token_name'
         11        FETCH_DIM_R                                      ~8      !2, 0
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        ECHO                                                     $9
         15        ECHO                                                     '%0A'
   13    16    > > JMP                                                      ->7
         17    >   FE_FREE                                                  $6
   18    18        INIT_FCALL                                               'var_dump'
         19        FETCH_DIM_R                                      ~10     !1, 2
         20        SEND_VAL                                                 ~10
         21        DO_ICALL                                                 
   19    22        INIT_FCALL                                               'var_dump'
         23        FETCH_DIM_R                                      ~12     !1, 4
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.58 ms | 992 KiB | 16 Q