3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo { define("MYCONST", array()); const MYOTHERCONST = array(); } namespace bar { echo MYCONST; echo foo::MYOTHERCONST; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KrjIr
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cdefine'
          1        SEND_VAL_EX                                              'MYCONST'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
    4     4        DECLARE_CONST                                            'foo%5CMYOTHERCONST', <array>
    8     5        FETCH_CONSTANT                                   ~1      'bar%5CMYCONST'
          6        ECHO                                                     ~1
    9     7        FETCH_CLASS_CONSTANT                             ~2      'bar%5Cfoo', 'MYOTHERCONST'
          8        ECHO                                                     ~2
   10     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.64 ms | 1385 KiB | 15 Q