summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-10-23 18:46:35 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-10-23 18:46:35 +0000
commit72fc6bc4b154b5887deb04a627dbe8f85b152c92 (patch)
tree4a36073927354810b208e602be41e12e85b12e4d
parent991e30668f78696c8e47ab808996c26fef7c7402 (diff)
downloadphp-git-72fc6bc4b154b5887deb04a627dbe8f85b152c92.tar.gz
As suggested on php-dev, array_fill() is probably a better name for this
function.
-rw-r--r--NEWS2
-rw-r--r--ext/standard/array.c4
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/php_array.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 235d154de9..1cb5b84d5e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.2.0-dev
- Added session_cache_expire() function. (patch from anuradha@gnu.org)
-- Add array_init() function (Rasmus)
+- Add array_fill() function (Rasmus)
- Hide Authorization header from phpinfo() output in safe_mode (Rasmus)
- Re-instated safe-mode realm mangling (Rasmus)
- Fixed a bug in preg_replace() that would change the type of the replacement
diff --git a/ext/standard/array.c b/ext/standard/array.c
index bcc9370f73..2807129fa0 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1325,9 +1325,9 @@ PHP_FUNCTION(compact)
}
/* }}} */
-/* {{{ proto array array_init(int start_key, int num, mixed val)
+/* {{{ proto array array_fill(int start_key, int num, mixed val)
Create an array containing num elements starting with index start_key each initialized to val */
-PHP_FUNCTION(array_init)
+PHP_FUNCTION(array_fill)
{
zval **start_key, **num, **val, *newval;
long i;
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index efbbbf860e..8ee3402374 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -755,7 +755,7 @@ function_entry basic_functions[] = {
PHP_FE(array_search, NULL)
PHP_FE(extract, NULL)
PHP_FE(compact, NULL)
- PHP_FE(array_init, NULL)
+ PHP_FE(array_fill, NULL)
PHP_FE(range, NULL)
PHP_FE(array_multisort, NULL)
PHP_FE(array_push, first_arg_force_ref)
diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h
index 7598f2aaa5..880ce2c74d 100644
--- a/ext/standard/php_array.h
+++ b/ext/standard/php_array.h
@@ -52,7 +52,7 @@ PHP_FUNCTION(in_array);
PHP_FUNCTION(array_search);
PHP_FUNCTION(extract);
PHP_FUNCTION(compact);
-PHP_FUNCTION(array_init);
+PHP_FUNCTION(array_fill);
PHP_FUNCTION(range);
PHP_FUNCTION(shuffle);
PHP_FUNCTION(array_multisort);