3v4l.org

run code in 500+ PHP versions simultaneously
<?php $clients = [ 'users' => [ '0' => [ 'id' => '1212', 'phone' => '22204490122', 'message' => 'dddd', ], '1' => [ 'id' => '4111', 'phone' => '22204490122', 'message' => 'aaaa', ], ] ]; $last = count($clients['users']) - 1; echo $clients['users'][$last]['id']; $last = array_key_last($clients['users']); echo $clients['users'][$last]['id'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xn2TU
function name:  (null)
number of ops:  19
compiled vars:  !0 = $clients, !1 = $last
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        FETCH_DIM_R                                          ~3      !0, 'users'
          2        COUNT                                                ~4      ~3
          3        SUB                                                  ~5      ~4, 1
          4        ASSIGN                                                       !1, ~5
   20     5        FETCH_DIM_R                                          ~7      !0, 'users'
          6        FETCH_DIM_R                                          ~8      ~7, !1
          7        FETCH_DIM_R                                          ~9      ~8, 'id'
          8        ECHO                                                         ~9
   22     9        INIT_FCALL                                                   'array_key_last'
         10        FETCH_DIM_R                                          ~10     !0, 'users'
         11        SEND_VAL                                                     ~10
         12        DO_ICALL                                             $11     
         13        ASSIGN                                                       !1, $11
   24    14        FETCH_DIM_R                                          ~13     !0, 'users'
         15        FETCH_DIM_R                                          ~14     ~13, !1
         16        FETCH_DIM_R                                          ~15     ~14, 'id'
         17        ECHO                                                         ~15
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.56 ms | 1852 KiB | 14 Q