bug35176.phpt 633 B

123456789101112131415161718
  1. --TEST--
  2. Bug #35176 (include()/require()/*_once() produce wrong error messages about main())
  3. --INI--
  4. html_errors=1
  5. docref_root="/"
  6. error_reporting=4095
  7. --FILE--
  8. <?php
  9. require_once('nonexistent.php');
  10. ?>
  11. --EXPECTF--
  12. <br />
  13. <b>Warning</b>: require_once(nonexistent.php) [<a href='/function.require-once.html'>function.require-once.html</a>]: Failed to open stream: No such file or directory in <b>%sbug35176.php</b> on line <b>2</b><br />
  14. <br />
  15. <b>Fatal error</b>: Uncaught Error: Failed opening required 'nonexistent.php' (include_path='%s') in %s:%d
  16. Stack trace:
  17. #0 {main}
  18. thrown in <b>%sbug35176.php</b> on line <b>2</b><br />