3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [['number'=>777]]; $b = []; for ($i = 0; $i < 50; ++$i) { //$b += $a; $b = array_merge($a, $b); $b[$i]['number'] = $i; } array_walk($b, function($val, $key) { echo '$b[' . $key . ']["number"] = ' . $val['number'] . PHP_EOL; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/mDF1a
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
    6     4    >   INIT_FCALL                                               'array_merge'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    7     9        FETCH_DIM_W                                      $8      !1, !2
         10        ASSIGN_DIM                                               $8, 'number'
         11        OP_DATA                                                  !2
    4    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, 50
         14      > JMPNZ                                                    ~11, ->4
    9    15    >   INIT_FCALL                                               'array_walk'
         16        SEND_REF                                                 !1
         17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FmDF1a%3A9%240'
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FmDF1a%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mDF1a
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $val, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      '%24b%5B', !1
          3        CONCAT                                           ~3      ~2, '%5D%5B%22number%22%5D+%3D+'
          4        FETCH_DIM_R                                      ~4      !0, 'number'
          5        CONCAT                                           ~5      ~3, ~4
          6        CONCAT                                           ~6      ~5, '%0A'
          7        ECHO                                                     ~6
          8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FmDF1a%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.87 ms | 1396 KiB | 17 Q