You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We propose to deprecate this INI setting and make in default to Off in PHP 8.5, then to hardcode it to Off for all non-CLI-related SAPIs on PHP 9 (while keeping it hardcoded to On for CLI-related ones).
When I try php -r "echo ini_get('register_argc_argv');" on PHP 8.5.0-dev (cli) (built: Oct 18 2025 21:59:48) (NTS) it outputs 0. But I'm on the command line and I'd expect this to be set to 1.
PHP Version
PHP 8.5.0-dev (cli) (built: Oct 18 2025 21:59:48) (NTS)
Copyright (c) The PHP Group
Built by Shivam Mathur
Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies
Operating System
macOS 15.7 (and also on ubuntu-latest in GitHub Actions with setup-php)
Reacted by Thomas Landauer, Sergei Predvoditelev, JeroenOnline, Kent Rasmussen, Dieter Beck and Tõnis Ormisson
Please see discussion in #20280. To understand this motivation of this issue: Did you raise it, because the implementation is giving you troubles in some way or did you raise it just to double-check that we didn't accidentally make a mistake?
I raised it because the behaviour doesn't match the content of the RFC people voted hore, and presumably what should also happen in PHP 9. register_argc_argv should still be 1 in CLI be default.
I noticed the change only because I upgraded to PHP 8.5 in issue-bot (a bot that notices changes in reported errors in code snippets shared by users) and some additional issues appeared related to this: phpstan/phpstan#12625 (comment) (the change itself doesn't matter to me and doesn't break anything so I'd be fine with it).
I have read the linked discussion, so this means that Codeception must change it's code to be compatible with PHP 8.5?
PHP Fatal error: Uncaught Codeception\Exception\ConfigurationException: register_argc_argv must be set to On for running Codeception in /app/vendor/codeception/codeception/src/Codeception/Application.php:98
Meanwhile I guess I will have to provide a hardcoded config myself in the image, so that we are not breaking all our builds all at once with this single setting.
Thanks, however in our development image we have the cli+fpm together and symlink their config to a single source of truth (/etc/php/$version/cli is symlinked to /etc/php/$version/fpm, then /etc/php/$version/fpm/conf.d is symlinked to /etc/php/conf.d). This allows developers to mount custom configuration files to a single path (/etc/php/conf.d) and have it work for both SAPI-s, as we are running Codeception from this container and also serve our PHP HTTP application from it for the tests (via fpm and nginx).
I admit we could have two separate images, two separate services, but that increases maintenance needs and so far it worked for us, and it should be working still if this bug wouldn't exist.
We did set the configuration On in php.ini, but that means it would be On for fpm too so we had to add php_admin_value[register_argc_argv] = off to the fpm pool config to switch it off again there. It works.
I hope we can remove these workarounds when this gets fixed according to the RFC (cli On, fpm Off by default).
Activity
TimWolla commentedon Oct 24, 2025
Please see discussion in #20280. To understand this motivation of this issue: Did you raise it, because the implementation is giving you troubles in some way or did you raise it just to double-check that we didn't accidentally make a mistake?
ondrejmirtes commentedon Oct 25, 2025
I raised it because the behaviour doesn't match the content of the RFC people voted hore, and presumably what should also happen in PHP 9.
register_argc_argvshould still be1in CLI be default.I noticed the change only because I upgraded to PHP 8.5 in issue-bot (a bot that notices changes in reported errors in code snippets shared by users) and some additional issues appeared related to this: phpstan/phpstan#12625 (comment) (the change itself doesn't matter to me and doesn't break anything so I'd be fine with it).
tamastoth-byborg commentedon Nov 18, 2025
I have read the linked discussion, so this means that Codeception must change it's code to be compatible with PHP 8.5?
PHP Fatal error: Uncaught Codeception\Exception\ConfigurationException: register_argc_argv must be set to On for running Codeception in /app/vendor/codeception/codeception/src/Codeception/Application.php:98
I'm using PHP 8.5.0RC5 (cli) (built: Nov 14 2025 17:24:29) (NTS) from https://launchpad.net/~ondrej/+archive/ubuntu/php in the ubuntu:22.04 docker image, with latest Codeception 5.3.2.
Meanwhile I guess I will have to provide a hardcoded config myself in the image, so that we are not breaking all our builds all at once with this single setting.
ondrejmirtes commentedon Nov 18, 2025
I think this should be fixed in php-src to match what was voted on in the RFC.
[TASK] Enable PHP8.5 codeception acceptance testing
[TASK] Enable PHP8.5 codeception acceptance testing
ThomasLandauer commentedon Dec 19, 2025
@tamastoth-byborg No, just change your
php.inisetting for now; I've added an answer to Stack Overflow: https://stackoverflow.com/q/79850953/1668200tamastoth-byborg commentedon Dec 19, 2025
Thanks, however in our development image we have the cli+fpm together and symlink their config to a single source of truth (/etc/php/$version/cli is symlinked to /etc/php/$version/fpm, then /etc/php/$version/fpm/conf.d is symlinked to /etc/php/conf.d). This allows developers to mount custom configuration files to a single path (/etc/php/conf.d) and have it work for both SAPI-s, as we are running Codeception from this container and also serve our PHP HTTP application from it for the tests (via fpm and nginx).
I admit we could have two separate images, two separate services, but that increases maintenance needs and so far it worked for us, and it should be working still if this bug wouldn't exist.
We did set the configuration On in php.ini, but that means it would be On for fpm too so we had to add
php_admin_value[register_argc_argv] = offto the fpm pool config to switch it off again there. It works.I hope we can remove these workarounds when this gets fixed according to the RFC (cli On, fpm Off by default).
$argc/$argv do not exist anymore in PHP 8.5