class_constants_006.phpt 257 B

12345678910111213
  1. --TEST--
  2. Ownership of constant expression inhereted from interface should be transfered to class
  3. --FILE--
  4. <?php
  5. interface I {
  6. const X2 = 'X' . self::Y2;
  7. const Y2 = 'Y';
  8. }
  9. eval('class B implements I{}');
  10. var_dump(B::X2);
  11. ?>
  12. --EXPECT--
  13. string(2) "XY"