3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 6, 2]; array_unshift($array, array_pop($array)); print_r($array); $array = [1, 6, 2]; $tmp = array_splice($array, 2, 1); array_unshift($array, $tmp[0]); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZADKF
function name:  (null)
number of ops:  27
compiled vars:  !0 = $array, !1 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_unshift'
          2        SEND_REF                                                 !0
          3        INIT_FCALL                                               'array_pop'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    7    11        ASSIGN                                                   !0, <array>
    8    12        INIT_FCALL                                               'array_splice'
         13        SEND_REF                                                 !0
         14        SEND_VAL                                                 2
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
    9    18        INIT_FCALL                                               'array_unshift'
         19        SEND_REF                                                 !0
         20        FETCH_DIM_R                                      ~9      !1, 0
         21        SEND_VAL                                                 ~9
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.63 ms | 1395 KiB | 21 Q