3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fred() { echo "dino"; } function barney() { foreach (range(1, 10) as $x) { yield fred(); } } echo barney();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/joAeV
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'barney'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function fred:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/joAeV
function name:  fred
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'dino'
    5     1      > RETURN                                                   null

End of function fred

Function barney:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 11
filename:       /in/joAeV
function name:  barney
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   GENERATOR_CREATE                                         
    8     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10
          4        DO_ICALL                                         $1      
          5      > FE_RESET_R                                       $2      $1, ->11
          6    > > FE_FETCH_R                                               $2, !0, ->11
    9     7    >   INIT_FCALL                                               'fred'
          8        DO_FCALL                                      0  $3      
          9        YIELD                                                    $3
    8    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $2
   11    12      > GENERATOR_RETURN                                         

End of function barney

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.56 ms | 1398 KiB | 17 Q