Doc #53346 [NEW]: Wrong Spl class
| From: | klaimath at libero dot it | Date: | Thu, 18 Nov 2010 14:55:24 +0000 |
| Subject: | Doc #53346 [NEW]: Wrong Spl class | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-5548@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu 10.10
PHP version: 5.3.3
Package: SPL related
Bug Type: Documentation Problem
Bug description:Wrong Spl class
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 bug report at http://bugs.php.net/bug.php?id=53346&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53346&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53346&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53346&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53346&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53346&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53346&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53346&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53346&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53346&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53346&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53346&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53346&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53346&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53346&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53346&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53346&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53346&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53346&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53346&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53346&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53346&r=mysqlcfg