3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[] = 'data1'; // I want [0 => 'data1'] unset($array[0]); // I want [] $array = array_values($array); // I want [] but keys resetted $array[] = 'data2'; // I want [0 => 'data2'] $array[] = 'data3'; // I want [0 => 'data2', 1 => 'data3'] var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/auHLM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  'data1'
    4     2        UNSET_DIM                                                !0, 0
    5     3        INIT_FCALL                                               'array_values'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    6     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  'data2'
    7     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  'data3'
    8    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.8 ms | 1010 KiB | 15 Q