3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array['ids'] = array( '0' => array( 'id' => 1, 'val' => 'one'), 'delete' => 3, '2' => array( 'id' => 2, 'val' => 'two'), '1' => array( 'id' => 3, 'val' => 'three')); unset($array['ids']['delete']); foreach( $array['ids'] as &$ids ) { $ids['new'] = 'new'; } print_r($array); $array['ids'] = array_values($array['ids']); print_r($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 126) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/qdgiF
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $ids
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'ids'
          1        OP_DATA                                                  <array>
    7     2        FETCH_DIM_UNSET                                  $3      !0, 'ids'
          3        UNSET_DIM                                                $3, 'delete'
    8     4        FETCH_DIM_W                                      $4      !0, 'ids'
          5      > FE_RESET_RW                                      $5      $4, ->10
          6    > > FE_FETCH_RW                                              $5, !1, ->10
    9     7    >   ASSIGN_DIM                                               !1, 'new'
          8        OP_DATA                                                  'new'
    8     9      > JMP                                                      ->6
         10    >   FE_FREE                                                  $5
   12    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   14    14        INIT_FCALL                                               'array_values'
         15        FETCH_DIM_R                                      ~9      !0, 'ids'
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                         $10     
         18        ASSIGN_DIM                                               !0, 'ids'
         19        OP_DATA                                                  $10
   16    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.83 ms | 1395 KiB | 17 Q