3v4l.org

run code in 300+ PHP versions simultaneously
<?php function series_sum($n) { $quotient = 1; $divident = 1; $increment_num = 3; $sum = 1; for($i=1; $i<$n; $i++){ $quotient += $increment_num; $sum += ($quotient/($divident)); } return $sum; } echo series_sum(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HWuP5
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'series_sum'
          1        SEND_VAL                                                 3
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function series_sum:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
Branch analysis from position: 7
filename:       /in/HWuP5
function name:  series_sum
number of ops:  15
compiled vars:  !0 = $n, !1 = $quotient, !2 = $divident, !3 = $increment_num, !4 = $sum, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, 1
    6     3        ASSIGN                                                   !3, 3
    7     4        ASSIGN                                                   !4, 1
    8     5        ASSIGN                                                   !5, 1
          6      > JMP                                                      ->11
    9     7    >   ASSIGN_OP                                     1          !1, !3
   10     8        DIV                                              ~12     !1, !2
          9        ASSIGN_OP                                     1          !4, ~12
    8    10        PRE_INC                                                  !5
         11    >   IS_SMALLER                                               !5, !0
         12      > JMPNZ                                                    ~15, ->7
   12    13    > > RETURN                                                   !4
   13    14*     > RETURN                                                   null

End of function series_sum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.3 ms | 1389 KiB | 14 Q