0
0
mirror of https://github.com/php/php-src.git synced 2024-12-18 14:30:35 +08:00
php-src/Zend/tests/bug74269.phpt

18 lines
468 B
PHP

--TEST--
Bug #74269: It's possible to override trait property with different loosely-equal value
--FILE--
<?php
trait PropertiesTrait
{
public $same = true;
}
class PropertiesExample
{
use PropertiesTrait;
public $same = 2;
}
?>
--EXPECTF--
Fatal error: PropertiesExample and PropertiesTrait define the same property ($same) in the composition of PropertiesExample. However, the definition differs and is considered incompatible. Class was composed in %s