Skip to content

main: Change the register_argc_argv INI default to Off #19473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TimWolla
Copy link
Member

This partly implements the deprecation of the register_argc_argv INI setting by updating the default value to ensure safe behavior when no INI file is loaded. The actual deprecation warning will follow separately, since it is non-trivial to implement with the desired per-SAPI behavior.

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive

This partly implements the deprecation of the `register_argc_argv` INI setting
by updating the default value to ensure safe behavior when no INI file is
loaded. The actual deprecation warning will follow separately, since it is
non-trivial to implement with the desired per-SAPI behavior.

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive
@TimWolla
Copy link
Member Author

@cmb69 Any idea for the Windows-specific failure?

@cmb69
Copy link
Member

cmb69 commented Aug 14, 2025

The --INI-- section is ignored on Windows, due to 9382673. Simplest solution would be to modify the test so the query string contains an equals sign:

 tests/basic/011.phpt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/basic/011.phpt b/tests/basic/011.phpt
index 03fccaa9b70..fd359fe4032 100644
--- a/tests/basic/011.phpt
+++ b/tests/basic/011.phpt
@@ -3,7 +3,7 @@
 --INI--
 register_argc_argv=1
 --GET--
-ab+cd+ef+123+test
+foo=ab+cd+ef+123+test
 --FILE--
 <?php
 $argc = $_SERVER['argc'];
@@ -15,7 +15,7 @@
 
 ?>
 --EXPECT--
-0: ab
+0: foo=ab
 1: cd
 2: ef
 3: 123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants