3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.93 ms | 1457 KiB | 17 Q