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 ); array_push($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/sntUP
function name:  (null)
number of ops:  18
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        INIT_FCALL                                               'array_push'
          6        FETCH_DIM_W                                      $7      !0, 'recipients'
          7        FETCH_DIM_W                                      $8      $7, 'signers'
          8        FETCH_DIM_W                                      $9      $8, 0
          9        FETCH_DIM_W                                      $10     $9, 'tabs'
         10        FETCH_DIM_W                                      $11     $10, 'textTabs'
         11        SEND_REF                                                 $11
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   60    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.15 ms | 1445 KiB | 15 Q