3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a(): Generator { for ($i = 0; $i <= 10; ++$i) { yield $i; } } function b(): Generator { echo 'php from b()'; return a(); } function c(): Generator { echo 'php from c()'; yield from a(); } b(); c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kpIIu
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'b'
          1        DO_FCALL                                      0          
   25     2        INIT_FCALL                                               'c'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kpIIu
function name:  b
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'php+from+b%28%29'
   14     1        INIT_FCALL                                               'a'
          2        DO_FCALL                                      0  $0      
          3        VERIFY_RETURN_TYPE                                       $0
          4      > RETURN                                                   $0
   15     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function b

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/kpIIu
function name:  c
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   GENERATOR_CREATE                                         
   19     1        ECHO                                                     'php+from+c%28%29'
   21     2        INIT_FCALL                                               'a'
          3        DO_FCALL                                      0  $0      
          4        YIELD_FROM                                       ~1      $0
          5        FREE                                                     ~1
   22     6      > GENERATOR_RETURN                                         

End of function c

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.09 ms | 1069 KiB | 17 Q