1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Files
archived-php-src/Zend/tests/traits/methods_002.phpt
T
2018-10-14 12:07:20 -03:00

29 lines
427 B
PHP

--TEST--
Testing collision with magic methods
--FILE--
<?php
trait foo {
public function __clone() {
var_dump(__FUNCTION__);
}
}
trait baz {
public function __clone() {
var_dump(__FUNCTION__);
}
}
class bar {
use foo;
use baz;
}
$o = new bar;
var_dump(clone $o);
?>
--EXPECTF--
Fatal error: Trait method __clone has not been applied, because there are collisions with other trait methods on bar in %s on line %d