r/PHPhelp • u/Dark_knight550 • May 20 '21
Learn PHP
I want to learn advanced PHP, give some suggestions about books, topics, and other necessary things...
14
10
4
u/Spicy_Poo May 20 '21
Start with an idea for something. Then google each problem and make short working code bits, then put it together.
2
u/kanine69 May 20 '21
As you start to code post some snippets here and you will get some great feedback.
1
u/zardwiz May 20 '21
Learn classes and objects. Not because PHP is the future, but because the general concepts are transferrable. If suddenly you need to write python (or anything else), the general concepts hold.
In general, books are useful only once you have a base competency. The “learn x the hard way” series are pretty useful for both specifics and generalities. You don’t need C to write PHP or any other high level language, but you do need to understand how your code impacts and interacts with the system.
From my own point of view, I wish I had started with C, then Python/PHP/etc. I have zero need to write low level code, but grasping the syntax and the interactions helps a great deal when trying to debug.
Once you grok the concepts, and what happens under the good, that is mostly transferrable.
If you need PHP in a hurry, start with a widely used project with a more or less well written code base. WP isn’t “well written” per se, but it works and you should be able to follow the code by stepping through and processing it mentally.
See also Moodle, some of the self hosted cloud software, and a hundred other projects. Focus on why it works, and more importantly why it doesn’t work / is insecure, etc.
Also, spend a few hours with access logs. Doesn’t have to be specific logs, but the sheer volume of attempts to access is go files in my nginx logs (zero PHP on any of those boxes!) is telling.
1
u/svn-ssh May 21 '21
Found this php design patterns book to be handy. PHP Objects, Patterns, and Practice
1
1
u/zaphod4th May 20 '21
!remindme 24hrs
1
u/RemindMeBot May 21 '21
There is a 23 hour delay fetching comments.
I will be messaging you in 1 day on 2021-05-21 17:53:11 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
6
u/AllenJB83 May 20 '21
Define "advanced" here. What do you want to achieve?