[PHP-DEV] [PATCH] New function file_put_contents()

2002-11-22 Thread Christian Schneider
Ok, I try again to submit the patch and a test script for it :-) Prototype: int file_put_contents(string filename, mixed data [, string mode]) It takes a filename (URL wrappers supported), the data to be written and a mode for the file. The data can be either a string or an array (which is

Re: [PHP-DEV] [PATCH] New function file_put()

2002-10-16 Thread Christian Schneider
Derick Rethans wrote: Please write a new test for this without piggy backing on the old one. We're trying to get one function tested per tests so that differenc functions in the same test can not be the cause of 'screw-ups'. Ok, I attached a file

[PHP-DEV] [PATCH] New function file_put()

2002-10-15 Thread Christian Schneider
Hi Folks, after seeing the new function file_get_contents() I figured a corresponding file_put() function should be added too. Prototype: int file_put(string filename, mixed data [, string mode]) It takes a filename (URL wrappers supported), the data to be written and a mode for the file. The

Re: [PHP-DEV] [PATCH] New function file_put()

2002-10-15 Thread Christian Schneider
Mike Robinson wrote: On a side note: I think the file_get_contents() function should be renamed to file_get() as it is useful enough to deserve a shorter name. Conversely, your new function should be named file_put_contents() for consistency. :) That's what I called the function initially

[PHP-DEV] [PATCH] New function file_put_contents()

2002-10-15 Thread Christian Schneider
Wez Furlong wrote: It's just that there was a thread about this recently on php-dev, and it's something to get right for new functions - we can fix the old ones as we go :-) The README, the Zend API doc on zend.com and the implementation in zend_API.c all assume an int * for string length in