3v4l.org

run code in 300+ PHP versions simultaneously
<?php function shutdown(): \Generator { try { yield; } finally { echo 'UNSET BEFORE yield', PHP_EOL; yield; } } $generator = shutdown(); $generator->rewind();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JQEOj
function name:  (null)
number of ops:  6
compiled vars:  !0 = $generator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'shutdown'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'rewind'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function shutdown:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 4, Position 2 = 3
Branch analysis from position: 4
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/JQEOj
function name:  shutdown
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   GENERATOR_CREATE                                         
    5     1        YIELD                                                    
    6     2      > FAST_CALL                                                ->4
          3    > > JMP                                                      ->8
    7     4    >   ECHO                                                     'UNSET+BEFORE+yield'
          5        ECHO                                                     '%0A'
    8     6        YIELD                                                    
          7      > FAST_RET                                                 
   10     8    > > GENERATOR_RETURN                                         

End of function shutdown

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.16 ms | 1397 KiB | 14 Q