Tuesday, October 17, 2023

one of the ugliest of php's quirks

 I do think that A. "web scripting" is a decent approach to many projects, B. PHP is one of the more seasoned ways of doing web scripting but I ran into one quirk that is horrible:

In short, you can't have a POST variable with a key containing period, space, or open square bracket. This harkens back to the (now safely deprecated) bad old dumb days of automagically exposing POST values as global variables... a horrible practice for sure, but now even though everyone reads values from $_POST and those keys could be anything, keys in that array will those characters converted to underscore...

No comments:

Post a Comment