php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Parameter bug

Open Nkcraft opened this issue 4 years ago • 1 comments

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

Nkcraft avatar Mar 30 '22 05:03 Nkcraft

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

damianwadley avatar Mar 30 '22 05:03 damianwadley