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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/I3ebL
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, ->15
          8    > > FE_FETCH_R                                               $9, !3, ->15
    9     9    >   MUL                                              ~10     !3, !0
         10        ASSIGN                                                   !4, ~10
   10    11        INIT_ARRAY                                       ~13     !4, !3
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  ~13
    8    14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $9
   14    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $14     
         19        ECHO                                                     $14
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.63 ms | 1395 KiB | 17 Q