3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = token_get_all( '<?php $a = ( bool ) 10; $a = ( bool ) 10; $a = ( /*comment*/ bool) 10;' ); foreach ($tokens as $token) { if (is_array($token)) { echo "Line {$token[2]}: ", token_name($token[0]), " ('{$token[1]}')", PHP_EOL; } else { echo $token, PHP_EOL; } }
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 = 25
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
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/nE9H8
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_FCALL                                               'token_get_all'
    4     1        SEND_VAL                                                 '%3C%3Fphp%0A%24a+%3D+%28+bool++%29+10%3B%0A%24a+%3D+%28%0A++++bool%0A%29+10%3B%0A%24a+%3D+%28+%2F%2Acomment%2A%2F+bool%29+10%3B'
    3     2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   12     4      > FE_RESET_R                                       $4      !0, ->28
          5    > > FE_FETCH_R                                               $4, !1, ->28
   13     6    >   TYPE_CHECK                                  128          !1
          7      > JMPZ                                                     ~5, ->25
   14     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'
   13    24      > JMP                                                      ->27
   16    25    >   ECHO                                                     !1
         26        ECHO                                                     '%0A'
   12    27    > > JMP                                                      ->5
         28    >   FE_FREE                                                  $4
   18    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.55 ms | 1434 KiB | 15 Q