3v4l.org

run code in 500+ PHP versions simultaneously
<?php $m = 3; $n = 4; $x = array_map( function () use ($m) { return array_fill(0, $m, 0); }, range(1, $n) ); print_r($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCJcc
function name:  (null)
number of ops:  17
compiled vars:  !0 = $m, !1 = $n, !2 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 3
    3     1        ASSIGN                                                       !1, 4
    5     2        INIT_FCALL                                                   'array_map'
    6     3        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          4        BIND_LEXICAL                                                 ~5, !0
          5        SEND_VAL                                                     ~5
    7     6        INIT_FCALL                                                   'range'
          7        SEND_VAL                                                     1
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                             $6      
         10        SEND_VAR                                                     $6
    5    11        DO_ICALL                                             $7      
         12        ASSIGN                                                       !2, $7
   10    13        INIT_FCALL                                                   'print_r'
         14        SEND_VAR                                                     !2
         15        DO_ICALL                                                     
         16      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCJcc
function name:  {closure:/in/CCJcc:6}
number of ops:  8
compiled vars:  !0 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                                  !0
          1        INIT_FCALL                                                   'array_fill'
          2        SEND_VAL                                                     0
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     0
          5        DO_ICALL                                             $1      
          6      > RETURN                                                       $1
          7*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.25 ms | 2317 KiB | 17 Q