3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('FOO', 10); $array = array(10 => FOO,"FOO" => 20); print $array[$array[FOO]] * $array["FOO"];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2o0av
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'FOO'
          2        SEND_VAL                                                 10
          3        DO_ICALL                                                 
    4     4        FETCH_CONSTANT                                   ~2      'FOO'
          5        INIT_ARRAY                                       ~3      ~2, 10
          6        ADD_ARRAY_ELEMENT                                ~3      20, 'FOO'
          7        ASSIGN                                                   !0, ~3
    5     8        FETCH_CONSTANT                                   ~5      'FOO'
          9        FETCH_DIM_R                                      ~6      !0, ~5
         10        FETCH_DIM_R                                      ~7      !0, ~6
         11        FETCH_DIM_R                                      ~8      !0, 'FOO'
         12        MUL                                              ~9      ~7, ~8
         13        ECHO                                                     ~9
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.14 ms | 1394 KiB | 15 Q