#3 assumes that the variable came from user input, it's not necessarily bad. In some cases (i.e. dynamically switching from ORDER BY ASC/DESC) it's quite acceptable. But PDO + prepared statements for sure.
#4 no need to use a library, htmlspecialchars/htmlentities are quite enough.
#5 I think many frameworks/libraries can go here - why pick on one?
#7 Mailgun, sengrid etc are becoming increasingly popular - worth mentioning.
#9 isn't PHP related
I agree with Piskvorrr - I favor require (though it isn't a function, no need for parenthesis.)
I don't favor require, I require it (sorry for the pun).
The main issue is that include() will just emit a warning and continue if the file doesn't exist, often leading to a confusing fatal error in a completely different part of the code; in other words, On Error Continue Next, PHP version. Even worse, people who use include are even more likely to use @include().
Oh, and require_once(), while we're on the subject: "if you're purposefully trying to require() a file twice, you're doing something Very Wrong."
#3 assumes that the variable came from user input, it's not necessarily bad. In some cases (i.e. dynamically switching from ORDER BY ASC/DESC) it's quite acceptable. But PDO + prepared statements for sure.
#4 no need to use a library, htmlspecialchars/htmlentities are quite enough.
#5 I think many frameworks/libraries can go here - why pick on one?
#7 Mailgun, sengrid etc are becoming increasingly popular - worth mentioning.
#9 isn't PHP related
I agree with Piskvorrr - I favor require (though it isn't a function, no need for parenthesis.)