documentation of file()
| From: | adhoc_message | Date: | Sun, 08 Oct 2017 12:40:45 +0000 |
| Subject: | documentation of file() | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969386723@lists.php.net to get a copy of this message | ||
Dear Sirs !
I have been using PHP for many Years now, so Im quite familiar.
But sometimes is fall over some documentation quirks
In the doc page about the file() function, is written...
about flags:
---------------------------
*FILE_IGNORE_NEW_LINES*
Do not add newline at the end of each array elementIm sorry - but there is *no* _adding _of any newline here. This is misleading and easy makes some think a newline is added by the system. It would be much more correct, to write "Any newline chars are ignored" (or skipped) - or simlilar - just dont use the word "add". about the Note about this functionality -------------------------- A note further below says:
* Each line in the resulting array will include the line ending, unless FILE_IGNORE_NEW_LINES is used, so you still need to use rtrim() if you do not want the line ending present.*Here the statements are contradicting: the sentence.... */so you still need to use rtrim() if you do not want the line ending present./* this sentence should be deleted - it confuses the subject by mixing two functionalities into the same line. At least correct this to.... */and If not used - you must use rtrim() on each array element if you do not want the line ending present. /*This would change the whole note to...
* Each line in the resulting array will include the line ending, unless FILE_IGNORE_NEW_LINES is used, **/and If not used - you must use rtrim() on each array element if you do not want the line ending present./*Regards /Peter*/ /*