Re: note 24997 deleted from function.file by philip
| From: | Maxim Maletsky | Date: | Sun, 02 Feb 2003 20:58:48 +0000 |
| Subject: | Re: note 24997 deleted from function.file by philip | ||
| References: | 1 2 | Groups: | php.doc php.notes |
| Request: | Send a blank email to php-notes+get-43298@lists.php.net to get a copy of this message | ||
On Sun, 2 Feb 2003 20:52:17 +0000 (GMT) Philip Olson <philip@cornado.com> wrote:
> This depends on your view of the notes system. It's purpose
> is for people noting improvements to the manual page itself,
> not a repository for code snippets (long, short or otherwise).
> But I also leave some useful examples, and many notes or
> implement them straight into the manual. The PHP community
> at large is where additional code snippets as it's not the job
> of the PHP manual nor should it be.
We are (I am) discussing this right now on the phpdoc. Check it out.
> I removed this one in particular because someone posted a correct
> one with explanation of the problem so I left that one.
Oh, I see.
> I removed note #28378 because it was silly and blatently
> wrong and a correct version already exists as an official
> example:
>
> // Explains the bogus #28378 note
>
> http://news.php.net/article.php?group=php.notes&article=43158
>
> My actions were appropriate and IMHO even too conservative
> but anyway that's my story. On a related note, I feel
> these notes teach the user that to simply get the number
> of lines of a file, they should load the entire file
> into memory and do a count on it. Not ideal for situations
> where just the number of lines is needed, such as picking
> a random line number. In which case use fopen/fgets and
>
wc -l but that gets overcomplicated and beyond the scope
> of a note. I did start on a reply but got distracted
> worrying about win32, safe_mode, and efficiency in relation
> to filesize ... so I just stopped but left the note. Also
> it might give people ideas like "Oh, I think I'll add a
> cool feature to my site that tells people how many lines
> are in a file so I'll use this file() function for that."
Well, you do make sense indeed. Just thought your points for removing
them were different. Afetr all, there is a lot of clean up to do within
the notes still. A lot.
--
Maxim Maletsky
maxim@php.net