I see on PHP that if I send a list of paramters with the name [], on server side it automatically save these values into an array.
So, for example, if I send values via GET :
<input type="checkbox" name="customArray[]" value="1" checked="checked" /> 1
<input type="checkbox" name="customArray[]" value="2" checked="checked" /> 2
<input type="checkbox" name="customArray[]" value="3" checked="checked" /> 3
I can access on php to that array with $_GET[‘customArray’].
I’d like to know this behaviour : is it a standart behaviour? Is it piloted by a directive? can I disable/able this? And so on…
I don’t like to create my application and know that in some years (maybe) this won’t be available anymore 🙂
Yes, it’s standard behaviour.
No, you can’t disable it.
It will not be made invalid in the future. Or, if it is, it’d likely only be done along with tremendous other changes to the language that would render a lot of your other code broken, too. In short, don’t worry about forward compatibility with this feature; it’s not going anywhere.
Indeed, it’s common-place to use this.