3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array( array( 'name' => 'Banana', 'continent' => 'Africa', 'counts' => array( 'standard' => 15, 'advanced' => 20 ) ), array( 'name' => 'Apple', 'continent' => 'Europa', 'counts' => array( 'standard' => 25, 'advanced' => 25 ) ) ); //In Europa, I can find 25 standard Apple. $key = array_keys($fruits[1]['counts'])[0]; echo "In {$fruits[1]['continent']}, I can find {$fruits[1]['counts']['standard']} {$key} {$fruits[1]['name']}"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KoQiO
function name:  (null)
number of ops:  25
compiled vars:  !0 = $fruits, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'array_keys'
          2        FETCH_DIM_R                                      ~3      !0, 1
          3        FETCH_DIM_R                                      ~4      ~3, 'counts'
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        FETCH_DIM_R                                      ~6      $5, 0
          7        ASSIGN                                                   !1, ~6
   22     8        ROPE_INIT                                     8  ~16     'In+'
          9        FETCH_DIM_R                                      ~8      !0, 1
         10        FETCH_DIM_R                                      ~9      ~8, 'continent'
         11        ROPE_ADD                                      1  ~16     ~16, ~9
         12        ROPE_ADD                                      2  ~16     ~16, '%2C+I+can+find+'
         13        FETCH_DIM_R                                      ~10     !0, 1
         14        FETCH_DIM_R                                      ~11     ~10, 'counts'
         15        FETCH_DIM_R                                      ~12     ~11, 'standard'
         16        ROPE_ADD                                      3  ~16     ~16, ~12
         17        ROPE_ADD                                      4  ~16     ~16, '+'
         18        ROPE_ADD                                      5  ~16     ~16, !1
         19        ROPE_ADD                                      6  ~16     ~16, '+'
         20        FETCH_DIM_R                                      ~13     !0, 1
         21        FETCH_DIM_R                                      ~14     ~13, 'name'
         22        ROPE_END                                      7  ~15     ~16, ~14
         23        ECHO                                                     ~15
   23    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.57 ms | 999 KiB | 14 Q