3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FRUIT = ['apple','pear','peach']; define('ANIMALS', [ 'dog', 'cat', 'bird' ]); echo ANIMALS[1]; // outputs "cat" echo FRUIT[1]; // outputs "pear" ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sD6DL
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'FRUIT', <array>
    5     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'ANIMALS'
    6     3        SEND_VAL                                                 <array>
          4        DO_ICALL                                                 
   11     5        FETCH_CONSTANT                                   ~1      'ANIMALS'
          6        FETCH_DIM_R                                      ~2      ~1, 1
          7        ECHO                                                     ~2
   12     8        FETCH_CONSTANT                                   ~3      'FRUIT'
          9        FETCH_DIM_R                                      ~4      ~3, 1
         10        ECHO                                                     ~4
   13    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.1 ms | 1394 KiB | 15 Q