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.
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.
PHP Apprentice – An online, open-source book for learning PHP
61–70 of 75 posts
Re: PHP Apprentice – An online, open-source book for learning PHP
#62I love PHP, it was my first “real” programming language, and I’m glad there are still people trying to make it easier to adopt. Having skimmed through several of these chapters, though, I just feel like it’s too similar to the official PHP docs, even down to the TOC. Wouldn’t it have been better for everyone to put this effort into improving the docs, rather than developing yet another book in a silo that likely won’…
Are there other technical reason's for advocating it, other than your love because it was your first "real" language?
Is there a better language built for rapid web application development. You could debate which is better rails/laravel but in 2019 I would learn php.
You may suggest Go, python, .net, node, Perl or java. They could be used but each only offers an advantage in certain situations and make development slower or have another disadvantage.
If you want to make a website using php is the simplest easiest fastest choice available.
Re: PHP Apprentice – An online, open-source book for learning PHP
#63Earlier quoted context omitted.
Are there other technical reason's for advocating it, other than your love because it was your first "real" language?
I can't find a better language to use in 2019 in the backend if you are developing a website. Is there a better language built for rapid web application development. You could debate which is better rails/laravel but in 2019 I would learn php. You may suggest Go, python, .net, node, Perl or java. They could be used but each only offers an advantage in certain situations and make development slower or have another dis…
Re: PHP Apprentice – An online, open-source book for learning PHP
#64Looks great! Perhaps, making it possible to turn pages with the arrow keys on the keyboard would make it a bit easier to navigate.
Re: PHP Apprentice – An online, open-source book for learning PHP
#65Nice job. I would suggest all PHP devs spend some time with https://phptherightway.com . Your resource looks to be a great starting point.
Not disagreeing but I usually recommend that people read http://www.phpthewrongway.com/ afterwards to get a more pragmatic viewpoint.
Re: PHP Apprentice – An online, open-source book for learning PHP
#66Nice 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.
Then I realized it was pretty amazing that it lasted that long in the first place.
Re: PHP Apprentice – An online, open-source book for learning PHP
#67Why not teach it better? https://glot.io/snippets/f8g0wlar0d No wonder PHP developers have a bad reputation.
Re: PHP Apprentice – An online, open-source book for learning PHP
#68The content is great. I like how you start off teaching the language by showing how to execute simple programs from the command line (I learned that you don’t need the `-f` option to execute a file). I’ve come across far too many PHP introductions that confuse the new learner by attempting to get them to set up a web server (usually Apache) and then all the strings have to be wrapped in HTML markup when printed. Ther…
Re: PHP Apprentice – An online, open-source book for learning PHP
#69Earlier quoted context omitted.
Not disagreeing but I usually recommend that people read http://www.phpthewrongway.com/ afterwards to get a more pragmatic viewpoint.
To be honest, it reads more as someone being salty they don’t understand the point of frameworks.
Re: PHP Apprentice – An online, open-source book for learning PHP
#70Nice 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’ 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.
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.