3v4l.org

run code in 500+ PHP versions simultaneously
<?php $p = 0; // Starting amount $i = 0.06; // Interest rate $c = 12; // compound frequency set to monthly $n = 6/12; // Current time invested set to 6 months $r = 200; // Monthly investment is 200 $x = $i / $c; $y = pow((1 + $x), ($n * $c)); if($p!=0) { $vf = $p * $y + ($r * ($y - 1) / $x); } else { $vf = 1 + $y + ($r * ($y - 1) / $x); } echo $vf;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9X7OH
function name:  (null)
number of ops:  31
compiled vars:  !0 = $p, !1 = $i, !2 = $c, !3 = $n, !4 = $r, !5 = $x, !6 = $y, !7 = $vf
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 0
    4     1        ASSIGN                                                       !1, 0.06
    5     2        ASSIGN                                                       !2, 12
    6     3        ASSIGN                                                       !3, 0.5
    7     4        ASSIGN                                                       !4, 200
    9     5        DIV                                                  ~13     !1, !2
          6        ASSIGN                                                       !5, ~13
   10     7        INIT_FCALL                                                   'pow'
          8        ADD                                                  ~15     1, !5
          9        SEND_VAL                                                     ~15
         10        MUL                                                  ~16     !3, !2
         11        SEND_VAL                                                     ~16
         12        DO_ICALL                                             $17     
         13        ASSIGN                                                       !6, $17
   12    14        IS_NOT_EQUAL                                                 !0, 0
         15      > JMPZ                                                         ~19, ->23
   14    16    >   MUL                                                  ~20     !0, !6
         17        SUB                                                  ~21     !6, 1
         18        MUL                                                  ~22     !4, ~21
         19        DIV                                                  ~23     ~22, !5
         20        ADD                                                  ~24     ~20, ~23
         21        ASSIGN                                                       !7, ~24
   12    22      > JMP                                                          ->29
   18    23    >   ADD                                                  ~26     1, !6
         24        SUB                                                  ~27     !6, 1
         25        MUL                                                  ~28     !4, ~27
         26        DIV                                                  ~29     ~28, !5
         27        ADD                                                  ~30     ~26, ~29
         28        ASSIGN                                                       !7, ~30
   23    29    >   ECHO                                                         !7
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.02 ms | 2872 KiB | 14 Q