exception_009.phpt 557 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Testing exception properties
  3. --FILE--
  4. <?php
  5. class my_file
  6. {
  7. public function __toString()
  8. {
  9. return "somebuildfilename" ;
  10. }
  11. }
  12. class my_exception extends exception
  13. {
  14. public function __construct()
  15. {
  16. $this->message = new stdclass ;
  17. $this->file = new my_file ;
  18. $this->line = "12" ;
  19. }
  20. }
  21. throw new my_exception;
  22. ?>
  23. --EXPECT--
  24. Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0