1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/Zend/tests/traits/bug76539.phpt

27 lines
352 B
PHP

--TEST--
Bug #76539 (Trait attribute is set incorrectly when using self::class with another string)
--FILE--
<?php
trait MyTrait {
protected $attr = self::class . 'Test';
public function test() {
echo $this->attr, PHP_EOL;
}
}
class A {
use MyTrait;
}
class B {
use MyTrait;
}
(new A())->test();
(new B())->test();
?>
--EXPECT--
ATest
BTest