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); $_500_over_2440 = 500 / 2440; foreach ($array as $key => $value) { $array[$key] = round($value * $_500_over_2440); } 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 = 27, Position 2 = 36
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
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/ZBp4n
function name:  (null)
number of ops:  45
compiled vars:  !0 = $array, !1 = $i, !2 = $_500_over_2440, !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
   11    18    >   INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'array_sum'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $14     
         22        SEND_VAR                                                 $14
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
   13    25        ASSIGN                                                   !2, 0.204918
   15    26      > FE_RESET_R                                       $17     !0, ->36
         27    > > FE_FETCH_R                                       ~18     $17, !3, ->36
         28    >   ASSIGN                                                   !4, ~18
   16    29        INIT_FCALL                                               'round'
         30        MUL                                              ~21     !3, !2
         31        SEND_VAL                                                 ~21
         32        DO_ICALL                                         $22     
         33        ASSIGN_DIM                                               !0, !4
         34        OP_DATA                                                  $22
   15    35      > JMP                                                      ->27
         36    >   FE_FREE                                                  $17
   19    37        INIT_FCALL                                               'var_dump'
         38        INIT_FCALL                                               'array_sum'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                         $23     
         41        SEND_VAR                                                 $23
         42        SEND_VAR                                                 !0
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.8 ms | 1400 KiB | 25 Q