3v4l.org

run code in 300+ PHP versions simultaneously
<?php $questanswer = 'happy all'; $wlist = array( array (4), array ('myself', 'labor', 'fresh', 'dollars', 'rose', 'quantity', 'mass', 'practices', 'therapy') ); $searchindex = 1; //convert object to array $convert = (array)$wlist; //now add the answer to it $convert[$searchindex][] = $questanswer; print_r($convert);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NbsIZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $questanswer, !1 = $wlist, !2 = $searchindex, !3 = $convert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'happy+all'
    3     1        ASSIGN                                                   !1, <array>
    8     2        ASSIGN                                                   !2, 1
   10     3        CAST                                          7  ~7      !1
          4        ASSIGN                                                   !3, ~7
   13     5        FETCH_DIM_W                                      $9      !3, !2
          6        ASSIGN_DIM                                               $9
          7        OP_DATA                                                  !0
   15     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.83 ms | 1398 KiB | 15 Q