News for hackers. Stuff that matters.
Re:PHP 7 Released by wmil on Wednesday December 02, 2015 @01:16PM (#10664707)
At the same time I understand why it would be more confusing for newbies.

In a language that already has string interpolation you're telling them to use a crappier custom version of string interpolation that's safe for databases.

Tutorials need to be more upfront about that.

Re:PHP 7 Released by sopooneo on Wednesday December 02, 2015 @02:23PM (#10665183)
But if the example above uses PDO underneath, then it's not just string interpolation though I think. It's sending the query and the parameters separately to the database, which is creating a "prepared data object" to plug the parameter values into.

I may be wrong, so please correct me if so.

Re:PHP 7 Released by sarciszewski on Wednesday December 02, 2015 @01:41PM (#10664875)
I've got "writing an open access PHP 7 online book to hopefully serve as a new, best-practices tutorial" next on my to do list.