summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-06-28 08:21:02 +0000
committerDerick Rethans <derick@php.net>2003-06-28 08:21:02 +0000
commitf2acb422234ef82f8a2f20c550f61caac46ada9d (patch)
tree64301ca9df5f40d56c36d1e0be8a74ea5b8735b3
parent3e67c2a63af0002c8c7c6630e4241651a413c401 (diff)
downloadphp-git-f2acb422234ef82f8a2f20c550f61caac46ada9d.tar.gz
- Return number of bytes written instead of just TRUE. (Path by Paul Hudson,
hudzilla@php.net)
-rw-r--r--ext/standard/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 4b46bd4308..060d5ba078 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -474,8 +474,8 @@ PHP_FUNCTION(file_get_contents)
}
/* }}} */
-/* {{{ proto string file_put_contents(string file, string data[, int flags[, resource context]])
- Write/Create a file with contents data */
+/* {{{ proto int file_put_contents(string file, string data[, int flags[, resource context]])
+ Write/Create a file with contents data and returns the number */
PHP_FUNCTION(file_put_contents)
{
php_stream *stream;
@@ -506,7 +506,7 @@ PHP_FUNCTION(file_put_contents)
}
php_stream_close(stream);
- RETURN_TRUE;
+ RETURN_LONG(numbytes);
}
/* }}} */