mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
7aacc705d0
Closes GH-5958
17 lines
334 B
PHP
17 lines
334 B
PHP
--TEST--
|
|
Bug #60173 (Wrong error message on reflective trait instantiation)
|
|
--FILE--
|
|
<?php
|
|
|
|
trait foo { }
|
|
|
|
$rc = new ReflectionClass('foo');
|
|
$rc->newInstance();
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): ReflectionClass->newInstance()
|
|
#1 {main}
|
|
thrown in %s on line %d
|