7 ms·
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.
by tangue 8y ago
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.
- settler4 8y agoThis is a very good resource for PDO: https://phpdelusions.net/pdo https://phpdelusions.net/pdo
- meritt 8y ago> 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.
- prophesi 8y agoYep, 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.
- mattigames 8y agoI 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)
- jordigh 8y agoEverything is political. I wouldn't want people to downvote Mercurial links into oblivion. Anyway, Google links are pretty much already ordered by popularity.
- mattigames 8y agoThat'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.
- ysleepy 8y agoExcept when that answer is 5 years old and is as wrong as the ExpertsExchange post from 2001.
- ceejayoz 8y agoUnlike EE, though, any user can propose an edit to that now-incorrect answer (or just edit it outright, if they have 2k rep). A nice big "this answer is outdated, see [other answer]" note does wonders.
- JeremyBanks 8y agoUnfortunately, such edits are rarely accepted. The intent was for the site to be more wiki-like, but these days "respect the author's intent" is the prevailing wisdom. The cases where someone edits a top answer with a significant correction or update are very few, and require overwhelming community support or they'll be reverted. This is particularly distressing in the case of security vulnerabilities. Vulnerable code being copied from Stack Overflow into consumer applications isn't hypothetical, it's been empirically demonstrated (https://www.aisec.fraunhofer.de/en/stackoverflow.html https://www.aisec.fraunhofer.de/en/stackoverflow.html), yet the community and company refuse to accept responsibility and address the problem. (Of course the developer creating the application is more responsible, but Stack Overflow is in a position where they could help protect innocent end users and the common good.) Pinning of accepted answers to the top of the list was a good idea when the site was young. These days, it prevents updated better answers from taking the place of ten-year-old misinformation.
- bpicolo 8y agoBuilt-in SEO gaming would be a weird feature
- ocdtrekkie 8y agoCan 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.
- restoreddev 8y agoPDO is definitely on the list. There are very few resources for it.
- ademup 8y agohttps://phpdelusions.net/pdo https://phpdelusions.net/pdo has done a very thorough job of covering PDO IMO and makes a fantastic companion to https://phptherightway.com/ https://phptherightway.com/.
- Aeolun 8y agoI’ appalled that my 10 year old website recently suddenly broke because someone updated PHP to 7.2. Then I realized it was pretty amazing that it lasted that long in the first place.
- mgkimsal 8y agosimilar. 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.