php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73652 Add SplFileInfo->getRealPath() example for php://output
Submitted: 2016-12-05 09:09 UTC Modified: 2017-03-21 11:31 UTC
From: tjcelaya at gmail dot com Assigned: peehaa (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tjcelaya at gmail dot com
New email:
PHP Version: OS:

 

 [2016-12-05 09:09 UTC] tjcelaya at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/splfileinfo.getrealpath
---

The docs mention SplFileInfo->getRealPath() can return FALSE if the file "does not exist". It would be useful to include an additional example like the following to demonstrate that a valid file handle can return FALSE:

$info = new SplFileInfo('php://output');
var_dump($info->getRealPath());

and the corresponding `bool(false)` in the generated output


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-05 10:32 UTC] cmb@php.net
-Type: Feature/Change Request +Type: Documentation Problem
 [2017-03-21 11:31 UTC] peehaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: peehaa
 [2017-03-21 11:31 UTC] peehaa@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Mar 16 09:01:29 2025 UTC