Why not teach it better?
https://glot.io/snippets/f8g0wlar0d
No wonder PHP developers have a bad reputation.
No wonder PHP developers have a bad reputation.
Example: "Why do you use double quotes everywhere?" Most probable answer: "Because I can use variables and the backslash-n thingies everywhere and its more convinient than using single quotes."
Example: "Why do you use '. "\n";' instead of the PHP_EOL constant?" Most probable answer: "What is PHP_EOL?";
Example: "Why aren't you using namespaces anywhere?" Most probable answer: "What are namespaces?"
Altough this might be a german perspective but I would not hire someone that presents me this kind of code. And for anyone saying "But this is only one book to learn the basics?" why not learn it the right way from the start?