3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FCCJcc%3A6%240'
          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
         11        DO_ICALL                                         $7      
    5    12        ASSIGN                                                   !2, $7
   10    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FCCJcc%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCJcc
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FCCJcc%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.44 ms | 1395 KiB | 21 Q