3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '2015-09-23' => [ 'user' => [13, 12], 'count' => [ 'count' => 2, 'total' => 2, ], ], '2015-09-24' => [ 'user' => [14], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-25' => [ 'user' => [15], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-26' => [ 'user' => [16], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-27' => [ 'user' => [17, 18], 'count' => [ 'count' => 2, 'total' => 2, ], ], '2015-09-28' => [ 'user' => [19, 20, 21, 22, 23, 24, 25, 26, 27, 28], 'count' => [ 'count' => 10, 'total' => 10, ], ], ]; $total = 0; foreach ($array as ['count' => ['count' => $c, 'total' => &$t]]) { $total += $c; $t = $total; } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/AfPEp
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $total, !2 = $c, !3 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   48     1        ASSIGN                                                   !1, 0
   49     2      > FE_RESET_RW                                      $6      !0, ->16
          3    > > FE_FETCH_RW                                              $6, $7, ->16
          4    >   FETCH_LIST_W                                     $8      $7, 'count'
          5        MAKE_REF                                         $9      $8
          6        FETCH_LIST_R                                     $10     $9, 'count'
          7        ASSIGN                                                   !2, $10
          8        FETCH_LIST_W                                     $12     $9, 'total'
          9        MAKE_REF                                         $13     $12
         10        ASSIGN_REF                                               !3, $13
         11        FREE                                                     $9
         12        FREE                                                     $7
   50    13        ASSIGN_OP                                     1          !1, !2
   51    14        ASSIGN                                                   !3, !1
   49    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   53    17        INIT_FCALL                                               'var_export'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.73 ms | 1405 KiB | 15 Q