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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC