3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo { define("MYCONST", 42); } namespace bar { define("foo\\MYCONST", 42); echo MYCONST; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8r4Z
function name:  (null)
number of ops:  11
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                                              42
          3        DO_FCALL                                      0          
    7     4        INIT_NS_FCALL_BY_NAME                                    'bar%5Cdefine'
          5        SEND_VAL_EX                                              'foo%5CMYCONST'
          6        SEND_VAL_EX                                              42
          7        DO_FCALL                                      0          
    9     8        FETCH_CONSTANT                                   ~2      'bar%5CMYCONST'
          9        ECHO                                                     ~2
   10    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.88 ms | 1385 KiB | 15 Q