3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a[0]='foo'; $a[1]=11; $a[2]=22; $a[3]=33; $result[key($a)] = array_slice($a, 1); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9kpAZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 0
          1        OP_DATA                                                  'foo'
    4     2        ASSIGN_DIM                                               !0, 1
          3        OP_DATA                                                  11
    5     4        ASSIGN_DIM                                               !0, 2
          5        OP_DATA                                                  22
    6     6        ASSIGN_DIM                                               !0, 3
          7        OP_DATA                                                  33
    8     8        INIT_FCALL                                               'key'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        INIT_FCALL                                               'array_slice'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $8      
         15        ASSIGN_DIM                                               !1, $6
         16        OP_DATA                                                  $8
   10    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.47 ms | 1395 KiB | 19 Q