Nice job and well written. A nice addition would be how to use pdo. I'm appalled by the number of ressources I see online which are using the old mysql api.
> I'm appalled by the number of ressources I see online which are using the old mysql api
Recently authored articles? We have an internet filled with 20 years of PHP tutorials, and unfortunately for beginners there's not an easy way to evaluate if something utilizes modern best practices or is an Experts Exchange post from 2001.
I find strange you can't down-vote a link on Google, it should exist and Google should take it into account specially for technical links (less so for opinions articles or anything political)
That's the problem, in technical links popularity (as in number of visits) is not linked to correctness, that's one of the reasons StackOverflow is so useful, because the top-voted answer is like 99% of the times the most correct (useful) one.
Yep, the plethora of out-of-date resources is what I'd place as the main issue with PHP today. I usually steer people to use the Laravel framework since it makes it difficult to write bad/dangerous code.
Can confirm. I've written one site with PDOs and a lot of sites with the old stuff. PDO is definitely a different feel to wrap around, and more resources on it would definitely be good.
For what it's worth though, my understanding is mysql_ functions are removed completely as of PHP 7. So that old documentation will just not work, rather than teaching people the least secure option of how to write their website.
similar. got a call from someone re: a site built on a homegrown mvc framework from 2000/2001 (when PHP4 was just out).
this call came in late 2017 saying "hey, we migrated the site and it doesn't work". There was some change in PHP5.6 and the initial PHP4 code had some "by reference" class stuff that wasn't working any more. It was a small change to get it working again, but there was enough PHP4 in it that a move to PHP7 wasn't going to work without a lot of work. I'd suggested a rebuild, which... wasn't too well received. Pointing out that they'd had 16 years of functionality on a web codebase (with no other costs) was probably as much ROI/value as you'd ever be able to get out of anything.
Recently authored articles? We have an internet filled with 20 years of PHP tutorials, and unfortunately for beginners there's not an easy way to evaluate if something utilizes modern best practices or is an Experts Exchange post from 2001.