Re: file_put_contents() / file_add_contents() ?
| From: | Ilia A. | Date: | Fri, 21 Feb 2003 14:41:57 +0000 |
| Subject: | Re: file_put_contents() / file_add_contents() ? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94435@lists.php.net to get a copy of this message | ||
On February 21, 2003 05:00 am, Sascha Schumann wrote:
> Alternatively, I would suggest to teach the submitter of that
> patch regarding fopen, fwrite, implode. He might have
> overlooked those existing functions.
That's what I like about PHP, you learn about new functions every single day.
You are quite correct in saying that these three functions (which will be
merged into one) are essentially a wrapper around fopen/fwrite (possibly
implode) and fclose. However, IMO this wrapper is very useful since it
simplifies commonly used code a great deal and even makes it slightly faster
since the wrapper is in C rather then in PHP. Given that we already have
file_get_contents(), a wrapper to do the opposite only makes sense to have.
The previous discussion on the usability and the need for such a function
seems gathered a fair bit of positive feedback as well.
Ilia