mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

This is a follow-up to #15990, as it turns out there was a second place that emits this kind of error message.
18 lines
316 B
PHP
18 lines
316 B
PHP
--TEST--
|
|
Cannot use static in trait insteadof method reference
|
|
--FILE--
|
|
<?php
|
|
|
|
trait SomeTrait {
|
|
public function foobar() {}
|
|
}
|
|
|
|
class Test {
|
|
use SomeTrait {
|
|
static::foobar insteadof SomeTrait;
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use "static" as trait name, as it is reserved in %s on line %d
|