This is the problem I have with PHP. 15 ways to do something seemingly simple, and only one obscure way is correct (What's PDO::ATTR_MODE ?) And why does PDO try to emulate prepares ?
That was 4 ways. The documentation identify what the options do.
Named parameters are much simpler to use IMO.
Re:PHP the Wrong Way
by CiPHPerCoder on Friday August 19, 2016 @12:27PM
(#12321224)
Simpler? No. Easier? Yes.
https://github.com/paragonie/airship/blob/8b7edde11b5b57fcb4...
See also: http://stackoverflow.com/a/12118602/2224584