3v4l.org

run code in 300+ PHP versions simultaneously
<?php function printer() { yield; } $printer = printer(); $printer->send(3); $printer->send(3); foreach($printer as $v) { var_dump($v); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/Keao3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $printer, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'printer'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
    7     3        INIT_METHOD_CALL                                         !0, 'send'
          4        SEND_VAL_EX                                              3
          5        DO_FCALL                                      0          
    9     6        INIT_METHOD_CALL                                         !0, 'send'
          7        SEND_VAL_EX                                              3
          8        DO_FCALL                                      0          
   10     9      > FE_RESET_R                                       $6      !0, ->15
         10    > > FE_FETCH_R                                               $6, !1, ->15
   11    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   10    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $6
   12    16      > RETURN                                                   1

Function printer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/Keao3
function name:  printer
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   GENERATOR_CREATE                                         
    3     1        YIELD                                                    
    4     2      > GENERATOR_RETURN                                         

End of function printer

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.05 ms | 1398 KiB | 16 Q