|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-18 11:08 UTC] tony2001@php.net
[2006-12-18 14:56 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
Description: ------------ A funny Exception is raised by SplFileObject on certain special situation. Reproduce code: --------------- <?php //yes, get_included_files() is important for the test !! if(count(get_included_files()) === 1) { // yes, **wrong** (mistyped) wrapper. $stdout = new SplFileObject('php://stdoutd', 'wb'); } ?> Expected result: ---------------- PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(php://stdoutd): failed to open stream: (Invalid Wrapper ? , File not found ? or something ;) ) Actual result: -------------- PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(php://stdoutd): failed to open stream: **Success** or in other cases without the get_included_files() call I get "Inappropriate ioctl for device" (!!)