php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53346 Wrong Spl class
Submitted: 2010-11-18 15:55 UTC Modified: 2010-11-18 16:00 UTC
From: klaimath at libero dot it Assigned: salathe (profile)
Status: Closed Package: SPL related
PHP Version: 5.3.3 OS: Ubuntu 10.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
12 - 12 = ?
Subscribe to this entry?

 
 [2010-11-18 15:55 UTC] klaimath at libero dot it
Description:
------------
---
From manual page: http://www.php.net/splfileinfo.islink#Examples
---

The following code is wrong:

<?php
$info = new SplInfo('/path/to/symlink');
if ($info->isLink()) {
    echo 'The real path is '.$info->getRealPath();
}
?>

The correct syntax for SplFileInfo class instance is $info = new SplFileInfo not $info = new SplInfo



Actual result:
--------------
<?php
$info = new SplFileInfo('/path/to/symlink');
if ($info->isLink()) {
    echo 'The real path is '.$info->getRealPath();
}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-18 15:59 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=305506
Log: Typo fix (SplInfo to SplFileInfo) (closes doc #53346)
 [2010-11-18 16:00 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2010-11-18 16:00 UTC] salathe@php.net
This bug has been fixed in SVN.

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/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-11-18 16:02 UTC] salathe@php.net
Urgh the automated message was the wrong one. 

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC