Live data from Hacker News

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

phpapprentice.com

71–75 of 75 posts

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

#71
post #65

Earlier quoted context omitted.

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.

I think I read mostly to the end before giving up on it.

There’s a lot of arguments, I just don’t think they’re particularly good.

Don’t misunderstand me, there is a point there, but it’s buried under a load of text.

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

#72

Earlier quoted context omitted.

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.

that doesn't work.

mysql_query($sql, $link);

mysqli_query($link, $sql);

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

#73
post #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?

Because the examples given in this "book" teach a bad coding style and explain nothing in detail. If a trainee only used this to prepare for the final exams and I was to ask a more in depth question he would propably fail.

Example: "Why do you use double quotes everywhere?" Most probable answer: "Because I can use variables and the backslash-n thingies everywhere and its more convinient than using single quotes."

Example: "Why do you use '. "\n";' instead of the PHP_EOL constant?" Most probable answer: "What is PHP_EOL?";

Example: "Why aren't you using namespaces anywhere?" Most probable answer: "What are namespaces?"

Altough this might be a german perspective but I would not hire someone that presents me this kind of code. And for anyone saying "But this is only one book to learn the basics?" why not learn it the right way from the start?

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

#74

Nice job. I would suggest all PHP devs spend some time with https://phptherightway.com . Your resource looks to be a great starting point.

I regularly use bash and I have learnt HTML, CSS and JavaScript in the past. If I had to use only one of these resources - OP's site or PHP the Right Way - which would you recommend I use? To put it some other ways - does OP's site adequately cover best practices? Is PHP the Right Way targeted aimed at fully-fledged programmers who want to pick up PHP?

Thank you in advance, it's much appreciated.

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

#75
Hire a hacker to help protect your children from cyber predators. Our professional hackers can find the source and help close the case on any investigation. Hire a Hacker! Everyone loses a password at some point. We help crack/recover passwords from computers, mobile & wireless devices, E-mail accounts, FaceBook and more! Hire hacker! Has your Facebook, Twitter or Google+ account been attacked by a hacker? Do you need to get back into a social media account? A Professional Hacker Can Help! Any email is hackable and we can get in and recover your passwords. Hire a professional hacker to recover your personal data. Hire an Email hacker now! Our professional hackers can encrypt any data and help protect sensitive information from any other hacker who might try to hack your systems or yoir devices. Hire a hacker now! No matter what your hacking need, we can get it done in a professional and timely manner. You can send us a mail to

hacktech@hackermail.com

With round the clock support you can reach one of our Ethical Hackers or our staff quickly and get your project started.

Post reply on HN