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(50); evil(...$args);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NTvZs
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                                                 50
          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/NTvZs
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 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 4
Branch analysis from position: 7
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 4
Branch analysis from position: 7
Branch analysis from position: 4
filename:       /in/NTvZs
function name:  evilGen
number of ops:  8
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                                                      ->5
   11     4    >   YIELD                                                    !1
   10     5    >   IS_SMALLER                                               !1, !0
          6      > JMPNZ                                                    ~4, ->4
   13     7    > > GENERATOR_RETURN                                         

End of function evilgen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.18 ms | 1399 KiB | 17 Q