ReflectionClass_CannotClone_basic.phpt 349 B

123456789101112131415
  1. --TEST--
  2. Reflection class can not be cloned
  3. --CREDITS--
  4. Stefan Koopmanschap <stefan@phpgg.nl>
  5. TestFest PHP|Tek
  6. --FILE--
  7. <?php
  8. $rc = new ReflectionClass("stdClass");
  9. $rc2 = clone($rc);
  10. ?>
  11. --EXPECTF--
  12. Fatal error: Uncaught Error: Trying to clone an uncloneable object of class ReflectionClass in %s:%d
  13. Stack trace:
  14. #0 {main}
  15. thrown in %s on line %d