cvs: /php4 main.c php.ini-dist php_globals.h
| From: | Zeev Suraski | Date: | Wed, 15 Dec 1999 21:21:05 +0000 |
| Subject: | cvs: /php4 main.c php.ini-dist php_globals.h | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7968@lists.php.net to get a copy of this message | ||
zeev Wed Dec 15 16:21:05 1999 EDT
Modified files:
/php4 main.c php.ini-dist php_globals.h
Log:
- Implement ability to turn off support for call-time pass by reference
Index: php4/main.c
diff -u php4/main.c:1.157 php4/main.c:1.158
--- php4/main.c:1.157 Wed Dec 15 12:41:19 1999
+++ php4/main.c Wed Dec 15 16:20:34 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.157 1999/12/15 17:41:19 andrei Exp $ */
+/* $Id: main.c,v 1.158 1999/12/15 21:20:34 zeev Exp $ */
#include <stdio.h>
@@ -187,6 +187,7 @@
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("short_open_tag", "1", PHP_INI_ALL, OnUpdateBool, short_tags, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_ALL, OnUpdateBool, asp_tags, php_core_globals, core_globals)
+ STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference", "1", PHP_INI_ALL, OnUpdateBool, allow_call_time_pass_reference,
php_core_globals, core_globals)
PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision)
STD_PHP_INI_BOOLEAN("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, output_buffering, php_core_globals, core_globals)
@@ -985,8 +986,9 @@
REGISTER_INI_ENTRIES();
- zuv.short_tags = (unsigned char) PG(short_tags);
- zuv.asp_tags = (unsigned char) PG(asp_tags);
+ zuv.short_tags = (zend_bool) PG(short_tags);
+ zuv.asp_tags = (zend_bool) PG(asp_tags);
+ zuv.allow_call_time_pass_reference = PG(allow_call_time_pass_reference);
zuv.import_use_extension = ".php";
zend_set_utility_values(&zuv);
php_startup_SAPI_content_types();
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.15 php4/php.ini-dist:1.16
--- php4/php.ini-dist:1.15 Sun Dec 12 09:17:22 1999
+++ php4/php.ini-dist Wed Dec 15 16:20:34 1999
@@ -44,6 +44,18 @@
; You can enable output buffering by in runtime by calling the output
; buffering functions, or enable output buffering for all files
; by setting this directive to On.
+allow_call_time_pass_reference = On ; whether to enable the ability to force arguments to be
+ ; passed by reference at function-call time. This method
+ ; is deprecated, and is likely to be unsupported in future
+ ; versions of PHP/Zend. The encouraged method of specifying
+ ; which arguments should be passed by reference is in the
+ ; function declaration. You're encouraged to try and
+ ; turn this option Off, and make sure your scripts work
+ ; properly with it, to ensure they will work with future
+ ; versions of the language (you will receive a warning
+ ; each time you use this feature, and the argument will
+ ; be passed by value instead of by reference).
+
; Safe Mode
safe_mode = Off
safe_mode_exec_dir =
Index: php4/php_globals.h
diff -u php4/php_globals.h:1.29 php4/php_globals.h:1.30
--- php4/php_globals.h:1.29 Fri Dec 3 00:03:16 1999
+++ php4/php_globals.h Wed Dec 15 16:20:34 1999
@@ -50,6 +50,8 @@
zend_bool asp_tags;
zend_bool short_tags;
+ zend_bool allow_call_time_pass_reference;
+ zend_bool zend_set_utility_values;
zend_bool output_buffering;
zend_bool safe_mode;