3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.9 ms | 1396 KiB | 17 Q