3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fetch($result) { while ($result) { yield $result; } } echo fetch([1,2,3,4,5,6,7,8]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S3W7G
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'fetch'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function fetch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 3
Branch analysis from position: 5
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 3
Branch analysis from position: 5
Branch analysis from position: 3
filename:       /in/S3W7G
function name:  fetch
number of ops:  6
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    3     2      > JMP                                                      ->4
    4     3    >   YIELD                                                    !0
    3     4    > > JMPNZ                                                    !0, ->3
    6     5    > > GENERATOR_RETURN                                         

End of function fetch

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.37 ms | 1397 KiB | 14 Q