3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = new \ArrayObject(["a", "b"]); $keys = array_keys((array)$array); $end_key = end($keys); var_dump($array[$end_key]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HTGYn
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $keys, !2 = $end_key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'array_keys'
          5        CAST                                          7  ~6      !0
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
    5     9        INIT_FCALL                                               'end'
         10        SEND_REF                                                 !1
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    7    13        INIT_FCALL                                               'var_dump'
         14        FETCH_DIM_R                                      ~11     !0, !2
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.74 ms | 1398 KiB | 19 Q