3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1954 => 10); reset($array); for ($i = 1; $i < 60; $i++) { $array[] = current($array) + 1; next($array); } //var_dump(array_sum($array), $array); $_450_over_2370 = 450 / 2370; foreach ($array as $key => $value) { $array[$key] = round($value * $_450_over_2370); } var_dump(array_sum($array), $array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
Branch analysis from position: 6
filename:       /in/r5Qut
function name:  (null)
number of ops:  38
compiled vars:  !0 = $array, !1 = $i, !2 = $_450_over_2370, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    7     4        ASSIGN                                                   !1, 1
          5      > JMP                                                      ->16
    8     6    >   INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $9      
          9        ADD                                              ~10     $9, 1
         10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  ~10
    9    12        INIT_FCALL                                               'next'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
    7    15        PRE_INC                                                  !1
         16    >   IS_SMALLER                                               !1, 60
         17      > JMPNZ                                                    ~13, ->6
   13    18    >   ASSIGN                                                   !2, 0.189873
   15    19      > FE_RESET_R                                       $15     !0, ->29
         20    > > FE_FETCH_R                                       ~16     $15, !3, ->29
         21    >   ASSIGN                                                   !4, ~16
   16    22        INIT_FCALL                                               'round'
         23        MUL                                              ~19     !3, !2
         24        SEND_VAL                                                 ~19
         25        DO_ICALL                                         $20     
         26        ASSIGN_DIM                                               !0, !4
         27        OP_DATA                                                  $20
   15    28      > JMP                                                      ->20
         29    >   FE_FREE                                                  $15
   19    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'array_sum'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $21     
         34        SEND_VAR                                                 $21
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.29 ms | 1400 KiB | 25 Q