php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51684 Manual pages requirement mistype
Submitted: 2010-04-28 18:20 UTC Modified: 2010-08-18 18:23 UTC
From: jmagalhaes dot pt at gmail dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2010-04-28 18:20 UTC] jmagalhaes dot pt at gmail dot com
Description:
------------
On the "is(...)" "DirectoryIterator" pages (eg: DirectoryIterator::isFile http://pt.php.net/manual/en/directoryiterator.isfile.php), it shows php requirement as "(PHP 5 <= 5.1.1)".

I believe this is only a mistype, since in the SPL installation page says:
"Note: As of PHP 5.3.0 this extension can no longer be disabled and is therefore always available.".


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-28 18:35 UTC] philip@php.net
-Status: Open +Status: Feedback
 [2010-04-28 18:35 UTC] philip@php.net
That simply says it cannot be disabled as of 5.3.0, whereas above that statement 
is the following:

"This extension is available and compiled by default in PHP 5.0.0."

So I'm unsure what you mean here, what's the bug?
 [2010-04-28 18:45 UTC] jmagalhaes dot pt at gmail dot com
-Status: Feedback +Status: Open
 [2010-04-28 18:45 UTC] jmagalhaes dot pt at gmail dot com
I was referring to the requirement of the PHP version for the class function is shown as <= 5.1.1.
I understood it as if the newer versions (> 5.1.1) wouldn't support that class function.
Either I read it wrong or should say only PHP 5 or > 5.1.1.
 [2010-04-28 19:08 UTC] philip@php.net
-Status: Open +Status: Bogus
 [2010-04-28 19:08 UTC] philip@php.net
Methods get added at random times. In this case, isfile() was added in PHP 5.1.1.

PHP <= 5.1.1 === PHP versions greater than or equal to 5.1.1

See Also: http://php.net/manual/en/about.prototypes.php
 [2010-04-28 19:18 UTC] philip@php.net
-Status: Bogus +Status: Open
 [2010-04-28 19:18 UTC] philip@php.net
Fail, I'll evaluate this :)
 [2010-04-28 19:21 UTC] jmagalhaes dot pt at gmail dot com
I was about to reply to your comment, but I'm glad you understand it now. :)

I know this isn't any bug, just a mistype, no worries.
 [2010-04-28 21:36 UTC] salathe@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: salathe
 [2010-04-28 21:36 UTC] salathe@php.net
The particular version that you cited is correct; let me explain. The method was introduced with PHP 5.0.0 and the parent SplFileInfo class was introduced in PHP 5.1.2.  As of SplFileInfo being around, the DirectoryIterator::isFile method no longer exists as its own entity and is simply inherited from SplFileInfo::isFile.

As for the best way to document this without causing further confusion, I'm working on it and open to suggestions.
 [2010-04-29 12:50 UTC] jmagalhaes dot pt at gmail dot com
I understand it now.

Since I have to deal with several servers with different versions of PHP, sometimes I have make different actions/scripts depending on the server version. With that, I started paying attention to the functions version requirement in the online manual.

This was the first time I saw a <= on a function requirement, and wasn't aware that are newer classes being added as root of existing classes (now that you explained it to me, I found PHP 5.1.2 change log: "Added class SplFileInfo as root class for DirectoryIterator and SplFileObject").

My suggestion would be of using some kind of info box (like the notes and tips, don't thing that a warning one is necessary), informing that prior to version x this class/function is an extend of another, or to use the new one instead, or something like that.

Thanks.
 [2010-06-10 18:21 UTC] salathe@php.net
-Type: Documentation Problem +Type: Feature/Change Request -Package: Website problem +Package: Documentation problem
 [2010-06-10 18:22 UTC] salathe@php.net
-Type: Feature/Change Request +Type: Documentation Problem
 [2010-06-10 18:22 UTC] salathe@php.net
Weird, I'm sure I didn't click feature/change request.
 [2010-08-18 18:23 UTC] salathe@php.net
-Status: Analyzed +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 02:01:33 2024 UTC