com php-src: Added test case for bug #76539 for master only as the behavior has been restored: Zend/tests/traits/bug76539.phpt

From: Date: Wed, 04 Jul 2018 17:50:34 +0000
Subject: com php-src: Added test case for bug #76539 for master only as the behavior has been restored: Zend/tests/traits/bug76539.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102404@lists.php.net to get a copy of this message
Commit: 6337af09dc476ce6c5da951e7e01b4592d272531 Author: Kalle Sommer Nielsen <kalle@php.net> Wed, 4 Jul 2018 19:50:34 +0200 Parents: 4a475a4976db92e71949786cdf5990c61514261e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6337af09dc476ce6c5da951e7e01b4592d272531 Log: Added test case for bug #76539 for master only as the behavior has been restored Bugs: https://bugs.php..net/76539 Changed paths: A Zend/tests/traits/bug76539.phpt Diff: diff --git a/Zend/tests/traits/bug76539.phpt b/Zend/tests/traits/bug76539.phpt new file mode 100644 index 0000000..51a75cd --- /dev/null +++ b/Zend/tests/traits/bug76539.phpt @@ -0,0 +1,26 @@ +--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

« previous php.cvs (#102404) next »