3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pay = [20, 40 , 89, 300, 190, 15]; $Capital = 1000; foreach ($pay as $amount) { $newCap = $Capital - $amount; echo $Capital . ' - ' . $amount . ' = ' . $newCap . '<br>'; $Capital = $newCap; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/qmqcv
function name:  (null)
number of ops:  16
compiled vars:  !0 = $pay, !1 = $Capital, !2 = $amount, !3 = $newCap
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 1000
    6     2      > FE_RESET_R                                       $6      !0, ->14
          3    > > FE_FETCH_R                                               $6, !2, ->14
    7     4    >   SUB                                              ~7      !1, !2
          5        ASSIGN                                                   !3, ~7
    8     6        CONCAT                                           ~9      !1, '+-+'
          7        CONCAT                                           ~10     ~9, !2
          8        CONCAT                                           ~11     ~10, '+%3D+'
          9        CONCAT                                           ~12     ~11, !3
         10        CONCAT                                           ~13     ~12, '%3Cbr%3E'
         11        ECHO                                                     ~13
    9    12        ASSIGN                                                   !1, !3
    6    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   10    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.84 ms | 1398 KiB | 13 Q