3v4l.org

run code in 200+ PHP versions simultaneously
<?php function series_sum($n) { $quotient = 1; $divident = 1; $increment_num = 3; $sum = 1; for($i=1; $i<$n; $i++){ $divident += $increment_num; $sum += ($quotient/($divident)); } return $sum; } echo series_sum(3);
based on HWuP5
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jQK5u
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 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/jQK5u
function name:  series_sum
number of ops:  16
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                                                      ->12
   9     7    >   ASSIGN_OP                                     1          !2, !3
  10     8        DIV                                              ~12     !1, !2
         9        ASSIGN_OP                                     1          !4, ~12
   8    10        POST_INC                                         ~14     !5
        11        FREE                                                     ~14
        12    >   IS_SMALLER_OR_EQUAL                              ~15     !5, !0
        13      > JMPNZ                                                    ~15, ->7
  12    14    > > RETURN                                                   !4
  13    15*     > RETURN                                                   null

End of function series_sum

Generated using Vulcan Logic Dumper, using php 7.4.0