Doc #53346 [Opn->Csd]: Wrong Spl class

From: Date: Thu, 18 Nov 2010 15:00:13 +0000
Subject: Doc #53346 [Opn->Csd]: Wrong Spl class
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5549@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53346&edit=1 ID: 53346 Updated by: salathe@php.net Reported by: klaimath at libero dot it Summary: Wrong Spl class -Status: Open +Status: Closed Type: Documentation Problem Package: SPL related Operating System: Ubuntu 10.10 PHP Version: 5.3.3 -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2010-11-18 15:59:30] 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 15:55:24] 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(); } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53346&edit=1

« previous php.doc.bugs (#5549) next »