3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getTaxRates = function () { yield 1.15 => 'reduced'; yield 1.21 => 'standard'; }; var_dump(iterator_to_array($getTaxRates()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4BSQF
function name:  (null)
number of ops:  11
compiled vars:  !0 = $getTaxRates
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'iterator_to_array'
          4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/4BSQF
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        YIELD                                                    'reduced', 1.15
    5     2        YIELD                                                    'standard', 1.21
    6     3      > GENERATOR_RETURN                                         

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.28 ms | 998 KiB | 15 Q