--TEST--
Ensure class constants are not evaluated when a class is looked up to resolve inheritance during runtime.
--FILE--
<?php
  
class C
  
{
      const 
E::A;
      public static 
$a = array(=> D::VE::=> K);
  }
  
  eval(
'class D extends C { const V = \'test\'; }');
  
  class 
extends D
  
{
      const 
"hello";
  }
  
  
define('K'"nasty");
  
  
var_dump(C::XC::$aD::XD::$aE::XE::$a);
?>
--EXPECTF--
string(5) "hello"
array(2) {
  ["nasty"]=>
  string(4) "test"
  ["hello"]=>
  string(5) "nasty"
}
string(5) "hello"
array(2) {
  ["nasty"]=>
  string(4) "test"
  ["hello"]=>
  string(5) "nasty"
}
string(5) "hello"
array(2) {
  ["nasty"]=>
  string(4) "test"
  ["hello"]=>
  string(5) "nasty"
}