3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array_reduce( range(0, $maximumDepth + 1), function($r) { return array($r); } ); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MJNTV
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test, !1 = $maximumDepth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_reduce'
    3     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 0
          3        ADD                                              ~2      !1, 1
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
    4     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMJNTV%3A4%240'
    6     8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
    2    10        ASSIGN                                                   !0, $5
    9    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMJNTV%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MJNTV
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_ARRAY                                       ~1      !0
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMJNTV%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.05 ms | 1395 KiB | 19 Q