|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-12-08 20:28 UTC] php-work at yandex dot ru
Description:
------------
Many crashes instead of exceptions or errors
Reproduce code:
---------------
1. <?php new SplFileObject('_file_does_not_exists_', 'r'); ?>
2. <?php new mysqli('badhost', 'badlogin', 'badpassword'); ?>
3. <?php file_get_contents('http://php.net'); ?>
Expected result:
----------------
1. Fatal error
2. Fatal error
3.
Actual result:
--------------
PHP Crashes
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Reproduce code: --------------- <?php $a = new SplFileObject('_file_does_not_exists_', 'r'); ?> Expected result: ---------------- Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(_file_does_not_exists_) [function.--construct]: failed to open stream: No such file or directory' in c:\www\script.php:2 Stack trace: #0 c:\www\script.php(2): SplFileObject->__construct('_file_does_not_...', 'r') #1 {main} thrown in c:\www\script.php on line 2 Actual result: -------------- PHP Crashes