3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ex = [ 'goo' => [ 1, 2 ], 'asdads' => [ 3, 4 ] ]; $test = array_reduce($ex, function ($a, $b) { if (null === $a) { $a = []; } call_user_func_array('array_push', $b); return $a; }); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qcuPh
function name:  (null)
number of ops:  11
compiled vars:  !0 = $ex, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   18     4        SEND_VAL                                                 ~3
   11     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   20     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/qcuPh
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        TYPE_CHECK                                    2          !0
          3      > JMPZ                                                     ~2, ->5
   13     4    >   ASSIGN                                                   !0, <array>
   16     5    >   INIT_FCALL                                               'array_push'
          6        SEND_ARRAY                                               !1
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      1          
   17     9      > RETURN                                                   !0
   18    10*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.74 ms | 1012 KiB | 16 Q