3v4l.org

run code in 300+ PHP versions simultaneously
<?php function evil(...$args) { var_dump($args); } function evilGen($maxArgs) { $i = 0; while ($i<$maxArgs) { yield $i++; } } $args = evilGen(500); evil(...$args);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hsdWW
function name:  (null)
number of ops:  9
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'evilgen'
          1        SEND_VAL                                                 500
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   16     4        INIT_FCALL                                               'evil'
          5        SEND_UNPACK                                              !0
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1          
          8      > RETURN                                                   1

Function evil:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hsdWW
function name:  evil
number of ops:  5
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                    !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function evil

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

End of function evilgen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.19 ms | 1390 KiB | 17 Q