<?php trait T{ public function test() { if (defined(self::class . "::X")) { echo self::X; } } } class A { private const X = "xxx"; use T; } $a = new A(); $a->test();
You have javascript disabled. You will not be able to edit any code.