3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.31 ms | 1401 KiB | 17 Q