php-src
php-src copied to clipboard
Parameter bug
Description
The following code:
<?php
echo $_GET['test_'];
Resulted in this output:
false
But I expected this output instead:
true
Parameter: ?test_=true&test[=false
PHP Version
PHP 8.1.2
Operating System
No response
For legacy reasons, certain characters that are invalid for PHP variable names, such as [ when not used with the correct array syntax, are converted to underscores.
https://www.php.net/manual/en/language.variables.external.php