1--TEST-- 2Edge case: self::self, self::parent, parent::self semi reserved constants access 3--FILE-- 4<?php 5 6class Foo { 7 const self = "self"; 8 const parent = "parent"; 9 public function __construct() { 10 echo "From ", __METHOD__, ":", PHP_EOL; 11 echo self::self, PHP_EOL; 12 echo self::parent, PHP_EOL; 13 } 14} 15 16class Bar extends Foo { 17 public function __construct() { 18 parent::__construct(); 19 echo "From ", __METHOD__, ":", PHP_EOL; 20 echo parent::self, PHP_EOL; 21 echo parent::parent, PHP_EOL; 22 } 23} 24 25new Bar; 26 27echo "\nDone\n"; 28?> 29--EXPECT-- 30From Foo::__construct: 31self 32parent 33From Bar::__construct: 34self 35parent 36 37Done 38