3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attribute = <<<EOF <?php #[Block( id: 'test', label: new TranslatableMarkup('test') )] class A {} EOF; foreach (token_get_all($attribute) as $token) { if (is_array($token)) { print token_name($token[0]) . ' ' . $token[1] . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/SeWYv7
function name:  (null)
number of ops:  20
compiled vars:  !0 = $attribute, !1 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fphp%0A%23%5BBlock%28%0A++id%3A+%27test%27%2C%0A++label%3A+new+TranslatableMarkup%28%27test%27%29%0A%29%5D%0Aclass+A+%7B%7D'
   12     1        INIT_FCALL                                               'token_get_all'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->18
          5    > > FE_FETCH_R                                               $4, !1, ->18
   13     6    >   TYPE_CHECK                                  128          !1
          7      > JMPZ                                                     ~5, ->17
   14     8    >   INIT_FCALL                                               'token_name'
          9        FETCH_DIM_R                                      ~6      !1, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        CONCAT                                           ~8      $7, '+'
         13        FETCH_DIM_R                                      ~9      !1, 1
         14        CONCAT                                           ~10     ~8, ~9
         15        CONCAT                                           ~11     ~10, '%0A'
         16        ECHO                                                     ~11
   12    17    > > JMP                                                      ->5
         18    >   FE_FREE                                                  $4
   16    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.16 ms | 1460 KiB | 15 Q