3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=[ ['Name','Email','Phone Number'], ['Mick','mick@mick.com','01234 324234'], ['james','james@james.com',''], ['reg','reg@reg.com','10293 467289'] ]; foreach($array as &$item){ if(strlen($item[2])) $item[1].=" + $item[2]"; unset($item[2]); } $array[0]=['Name','Info']; var_export($array); unset($item); // var_export($item); // ($item = NULL)
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/Ke3M0
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_RW                                      $3      !0, ->13
          2    > > FE_FETCH_RW                                              $3, !1, ->13
   10     3    >   FETCH_DIM_R                                      ~4      !1, 2
          4        STRLEN                                           ~5      ~4
          5      > JMPZ                                                     ~5, ->11
          6    >   NOP                                                      
          7        FETCH_DIM_R                                      ~7      !1, 2
          8        FAST_CONCAT                                      ~8      '+%2B+', ~7
          9        ASSIGN_DIM_OP                .=               8          !1, 1
         10        OP_DATA                                                  ~8
   11    11    >   UNSET_DIM                                                !1, 2
    9    12      > JMP                                                      ->2
         13    >   FE_FREE                                                  $3
   13    14        ASSIGN_DIM                                               !0, 0
         15        OP_DATA                                                  <array>
   14    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   15    19        UNSET_CV                                                 !1
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.48 ms | 1000 KiB | 14 Q