Live data from Hacker News

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

phpapprentice.com

11–20 of 75 posts

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

#12

Why not teach it better? https://glot.io/snippets/f8g0wlar0d No wonder PHP developers have a bad reputation.

I downvoted you because your comment doesn't help anybody and is offensive. Why do you think your example is better?

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

#13
post #6

Looks great! Perhaps, making it possible to turn pages with the arrow keys on the keyboard would make it a bit easier to navigate.

Not sure if the dev will see this, but it would be nice if it was a little easier to get to the table of contents as well. My suggested code change. (quick a dirty example)

  .menu {
    margin-bottom: 1.5em;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    padding: 10px;
  }

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

#14
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.

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

#16
post #8
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'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.

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.

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

#17
post #8
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'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)

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

#19
Nice little reference for anyone who already knows how to program, but might not know PHP. For anyone else, this isn't really going to help. There seems to be no explanation of _why_ you would want to do anything here or even how it relates to a goal. Who is your audience?

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

#20
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’t have the longevity we’d like?

Post reply on HN