bug60173.phpt 334 B

12345678910111213141516
  1. --TEST--
  2. Bug #60173 (Wrong error message on reflective trait instantiation)
  3. --FILE--
  4. <?php
  5. trait foo { }
  6. $rc = new ReflectionClass('foo');
  7. $rc->newInstance();
  8. ?>
  9. --EXPECTF--
  10. Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
  11. Stack trace:
  12. #0 %s(%d): ReflectionClass->newInstance()
  13. #1 {main}
  14. thrown in %s on line %d