3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xrange($from, $to){ $current = $from; while ($current < $to ) { $current++; yield $current; } } function sum(...$varArgs) { return array_sum($varArgs); } echo sum(...xrange(1,10));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jgrC1
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'sum'
          1        INIT_FCALL                                               'xrange'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10
          4        DO_FCALL                                      0  $0      
          5        SEND_UNPACK                                              $0
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1  $1      
          8        ECHO                                                     $1
          9      > RETURN                                                   1

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

End of function xrange

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

End of function sum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.3 ms | 1399 KiB | 17 Q