diff options
author | Zeev Suraski <zeev@php.net> | 1999-12-15 21:20:34 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-12-15 21:20:34 +0000 |
commit | d8000684bf11283cfbb5465fb7d35c31d0cf1cca (patch) | |
tree | aaaa9a828cd9e24ef701bf92cb5d8768d646e076 | |
parent | ced9cee10cf943568b487dc1204f95290b19de80 (diff) | |
download | php-git-d8000684bf11283cfbb5465fb7d35c31d0cf1cca.tar.gz |
- Implement ability to turn off support for call-time pass by reference
-rw-r--r-- | main/main.c | 6 | ||||
-rw-r--r-- | main/php_globals.h | 2 | ||||
-rw-r--r-- | php.ini-dist | 12 |
3 files changed, 18 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c index 2d149d0569..8b565733a1 100644 --- a/main/main.c +++ b/main/main.c @@ -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(); diff --git a/main/php_globals.h b/main/php_globals.h index b11f8a7816..0d3a8dfc28 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -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; diff --git a/php.ini-dist b/php.ini-dist index 0bd1971476..9f906a38b3 100644 --- a/php.ini-dist +++ b/php.ini-dist @@ -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 = |