Live data from Hacker News

PHP Apprentice – An online, open-source book for learning PHP

phpapprentice.com

61–70 of 75 posts

Re: PHP Apprentice – An online, open-source book for learning PHP

#61
post #4

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.

You're right, but you can just replace mysql_* with mysqli_* if you're so inclined.

Re: PHP Apprentice – An online, open-source book for learning PHP

#62
post #52

I 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?

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 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

#63
post #62
post #52

Earlier 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…

Thank you. I've looked for this sort of explanation.

Re: PHP Apprentice – An online, open-source book for learning PHP

#65

Nice 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.

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

#66
post #4

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’ 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.

Re: PHP Apprentice – An online, open-source book for learning PHP

#68

The 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…

Thanks! I really made it a goal to keep the site lightweight and simple.

Re: PHP Apprentice – An online, open-source book for learning PHP

#69
post #65

Earlier 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.

I think you skimmed the article too quick then because there are plenty of good and well supported arguments in it.

Re: PHP Apprentice – An online, open-source book for learning PHP

#70
post #66
post #4

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’ 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.

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.

Post reply on HN