3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_arr = [ [ 'item_name' => "aaa" ], [ 'item_name' => "bbb" ], [ 'item_name' => "ccc" ], ]; next($test_arr); $v = current($test_arr)['item_name']; var_dump($v); // string(3) "bbb"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q13ja
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test_arr, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'next'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'current'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        FETCH_DIM_R                                      ~5      $4, 'item_name'
          8        ASSIGN                                                   !1, ~5
   10     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   11    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.46 ms | 1398 KiB | 19 Q