3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1395 KiB | 21 Q