]> granicus.if.org Git - php/commitdiff
- Implement ability to turn off support for call-time pass by reference
authorZeev Suraski <zeev@php.net>
Wed, 15 Dec 1999 21:20:34 +0000 (21:20 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 15 Dec 1999 21:20:34 +0000 (21:20 +0000)
main/main.c
main/php_globals.h
php.ini-dist

index 2d149d0569018be5939b64854ae7258c53a56a84..8b565733a1db36485e7aa4474d53f78a622c7a5a 100644 (file)
@@ -187,6 +187,7 @@ static PHP_INI_MH(OnUpdateErrorReporting)
 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 @@ int php_module_startup(sapi_module_struct *sf)
 
        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 b11f8a7816e78ed4156483b96f7674691ccdc3d9..0d3a8dfc2886e9b9950b4c76f2c88021dc42da78 100644 (file)
@@ -50,6 +50,8 @@ struct _php_core_globals {
 
        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;
index 0bd1971476e6c837b515bd3e2b153bf4ddd44c10..9f906a38b312259c9a574db048133707f069de8f 100644 (file)
@@ -44,6 +44,18 @@ output_buffering     = Off   ; Output buffering allows you to send header lines (inclu
                                                        ; 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     =