1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Files
archived-php-src/Zend/tests/traits/error_001.phpt
T
2020-02-03 22:52:20 +01:00

29 lines
398 B
PHP

--TEST--
Trying to use instanceof for a method twice
--FILE--
<?php
trait foo {
public function foo() {
return 1;
}
}
trait foo2 {
public function foo() {
return 2;
}
}
class A extends foo {
use foo {
foo2::foo insteadof foo;
foo2::foo insteadof foo;
}
}
?>
--EXPECTF--
Fatal error: Class A cannot extend from trait foo in %s on line %d