3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tokens = PhpToken::tokenize('<?php match (1) {1=>2} + 1'); foreach ($tokens as $token) { echo "Line {$token->line}: {$token->getTokenName()} ('{$token->text}')", PHP_EOL; } print match (1) {1=>2} + 1;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 197) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/a1bVU
function name:  (null)
number of ops:  30
compiled vars:  !0 = $tokens, !1 = $token
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                      'PhpToken', 'tokenize'
          1        SEND_VAL                                                     '%3C%3Fphp+match+%281%29+%7B1%3D%3E2%7D+%2B+1'
          2        DO_FCALL                                          0  $2      
          3        ASSIGN                                                       !0, $2
    4     4      > FE_RESET_R                                           $4      !0, ->20
          5    > > FE_FETCH_R                                                   $4, !1, ->20
    5     6    >   ROPE_INIT                                         7  ~9      'Line+'
          7        FETCH_OBJ_R                                          ~5      !1, 'line'
          8        ROPE_ADD                                          1  ~9      ~9, ~5
          9        ROPE_ADD                                          2  ~9      ~9, '%3A+'
         10        INIT_METHOD_CALL                                             !1, 'getTokenName'
         11        DO_FCALL                                          0  $6      
         12        ROPE_ADD                                          3  ~9      ~9, $6
         13        ROPE_ADD                                          4  ~9      ~9, '+%28%27'
         14        FETCH_OBJ_R                                          ~7      !1, 'text'
         15        ROPE_ADD                                          5  ~9      ~9, ~7
         16        ROPE_END                                          6  ~8      ~9, '%27%29'
         17        ECHO                                                         ~8
         18        ECHO                                                         '%0A'
    4    19      > JMP                                                          ->5
         20    >   FE_FREE                                                      $4
    7    21        IS_IDENTICAL                                                 1, 1
         22      > JMPNZ                                                        ~13, ->25
         23    > > JMP                                                          ->24
         24    > > MATCH_ERROR                                                  1
         25    >   QM_ASSIGN                                            ~14     2
         26      > JMP                                                          ->27
         27    >   ADD                                                  ~15     ~14, 1
         28        ECHO                                                         ~15
    8    29      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.36 ms | 476 KiB | 7 Q