3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = Array ( 'recipients' => Array ( 'signers' => Array ( '0' => Array ( 'email' => 'rm@gmail.com', 'tabs' => Array ( 'checkboxTabs' => Array ( '0' => Array ( 'tabLabel' => 'sampleCheckbox' ) ), 'textTabs' => Array ( '0' => Array ( 'tabLabel' => 'CompanyName', 'value' => 'Qwerty' ), '1' => Array ( 'tabLabel' => 'TradingName', 'value' => 'Qwerty' ), '2' => Array ( 'tabLabel' => 'ContactName', 'value' => 'RM' ) ) ) ) ) ) ); $monthlytotal = 10; // i assume $array2 = array( "tabLabel"=>"MonthlyTotal", "value"=>$monthlytotal ); $array1['recipients']['signers']['0']['tabs']['textTabs'][] = $array2; print_r($array1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nHHUB
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array1, !1 = $monthlytotal, !2 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   53     1        ASSIGN                                                   !1, 10
   55     2        INIT_ARRAY                                       ~5      'MonthlyTotal', 'tabLabel'
   56     3        ADD_ARRAY_ELEMENT                                ~5      !1, 'value'
   54     4        ASSIGN                                                   !2, ~5
   59     5        FETCH_DIM_W                                      $7      !0, 'recipients'
          6        FETCH_DIM_W                                      $8      $7, 'signers'
          7        FETCH_DIM_W                                      $9      $8, 0
          8        FETCH_DIM_W                                      $10     $9, 'tabs'
          9        FETCH_DIM_W                                      $11     $10, 'textTabs'
         10        ASSIGN_DIM                                               $11
         11        OP_DATA                                                  !2
   61    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.52 ms | 1444 KiB | 14 Q