Positional parameters become a nightmare when dealing with more than 3 or 4 parameters. Named parameters are verbose. I'm thinking of doing this:
query("SELECT * FROM users WHERE username = ", $username, " AND password = ", $password)
With dynamic parameters (using func_get_args()
), every second one being transformed into a positional parameter.
I've never seen this before and wanted to know if anyone has done this before and why/why not?