3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.68 ms | 1387 KiB | 19 Q