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--EXPECT--
29From Foo::__construct:
30self
31parent
32From Bar::__construct:
33self
34parent
35
36Done
37