3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.64 ms | 1386 KiB | 21 Q