3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = [ 'fields' => [ ['id1' => 'someid', 'id2' => 'something'], ['id1' => 'someid', 'id2' => 'something'], ['id1' => 'someid', 'id2' => 'something'] ] ]; function config() { $a = ['id1' => 'someidA','id2' => 'somethingA']; $b = ['id1' => 'someidB','id2' => 'somethingB']; return [$a, $b]; } array_push($config['fields'], ...config()); var_export($config);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/barcp
function name:  (null)
number of ops:  13
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'array_push'
          2        FETCH_DIM_W                                      $2      !0, 'fields'
          3        SEND_REF                                                 $2
          4        INIT_FCALL                                               'config'
          5        DO_FCALL                                      0  $3      
          6        SEND_UNPACK                                              $3
          7        CHECK_UNDEF_ARGS                                         
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function config:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/barcp
function name:  config
number of ops:  6
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   13     2        INIT_ARRAY                                       ~4      !0
          3        ADD_ARRAY_ELEMENT                                ~4      !1
          4      > RETURN                                                   ~4
   14     5*     > RETURN                                                   null

End of function config

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.76 ms | 1000 KiB | 16 Q