3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = PhpToken::tokenize('<?php function foo() { /* c1 */ yield /* c2 */ from gen(); }'); print_r(array_slice($tokens, 7));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7VmX1
function name:  (null)
number of ops:  12
compiled vars:  !0 = $tokens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'PhpToken', 'tokenize'
          1        SEND_VAL                                                 '%3C%3Fphp+function+foo%28%29+%7B+%2F%2A+c1+%2A%2F+yield+%2F%2A+c2+%2A%2F+from+gen%28%29%3B+%7D'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
    5     4        INIT_FCALL                                               'print_r'
          5        INIT_FCALL                                               'array_slice'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 7
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.95 ms | 1426 KiB | 15 Q