3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getParams() { yield 'param1' => 'apple'; yield 'param2' => 'banana'; } $result = iterator_to_array(getParams()); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gDnEU
function name:  (null)
number of ops:  10
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'iterator_to_array'
          1        INIT_FCALL                                               'getparams'
          2        DO_FCALL                                      0  $1      
          3        SEND_VAR                                                 $1
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
   10     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function getparams:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/gDnEU
function name:  getParams
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        YIELD                                                    'apple', 'param1'
    5     2        YIELD                                                    'banana', 'param2'
    6     3      > GENERATOR_RETURN                                         

End of function getparams

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.79 ms | 1407 KiB | 18 Q