3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pricePerDay = 800; $days = range(1,20); $arr = array(); foreach ($days as $day) { $price = ($day * $pricePerDay); $arr[$day] = $price; //echo sprintf('Dag: %s, Pris: %s ', $day, $price) . PHP_EOL; } echo var_export($arr, true);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/mTONi
function name:  (null)
number of ops:  21
compiled vars:  !0 = $pricePerDay, !1 = $days, !2 = $arr, !3 = $day, !4 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 800
    4     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 20
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    6     6        ASSIGN                                                   !2, <array>
    8     7      > FE_RESET_R                                       $9      !1, ->14
          8    > > FE_FETCH_R                                               $9, !3, ->14
    9     9    >   MUL                                              ~10     !3, !0
         10        ASSIGN                                                   !4, ~10
   10    11        ASSIGN_DIM                                               !2, !3
         12        OP_DATA                                                  !4
    8    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $9
   14    15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $13     
         19        ECHO                                                     $13
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170 ms | 1395 KiB | 17 Q