As the first step on my endeavour to re-learn PHP I read the book “Head first PHP and MySQL”, O’Reily. I realize that book is quite old (2009), discussing PHP version 5 and is probably missing a lot modern stuff. But it helped my get back into PHP mindset and brought back the memories on what I did with PHP back in the old days.
On the book itself: I still love O’Reily’s “Head first” series! They are always fun to read, very practical and make it easy to grasp concepts. Unlike almost most books on technology or computer science, it’ light, fast reading. What I find awesome for beginners reading this book is that it demonstrates fully working (silly) real-life examples of web applications from chapter 1 on. As a beginner, you can follow through and at every step be exactly sure why you are learning that next concept, because it’s directly solving a problem that the solution from the last chapter showed.
On the content: Web pages in HTML, server-side rendering with PHP script, basic programming concept like variables and loops, writing and reading to/from MySQL database, validating forms, basic auth, sessions, template files, multimedia. It gives you all you need to get started, build your late 2000’er style pet webapp or small business web site with contact forms and so on. Of course nothing about frameworks, unit tests, build scripts, CI; I didn’t expect that from this book anyway. If you are a beginner in web programming, I absolutely recommend this book! You get fun, motivation and all the basic knowledge, but be aware that the real work begins afterwards.
On PHP: Now I remember what a horrible language PHP was! After reading “Clean Code”, getting into the whole mindset of software craftsmanship, and later even switching from Java to Kotlin I’m just so spoiled with elegant programming, that seeing the application code in this book makes me shiver. When I think of that HR-system we hacked together in PHP with xampp in 2008 or so, I realize what enormous development it has been since then.
But to be fair, I should not judge today’s PHP on the base of 10 year old books and experience. It’s reasonable to assume, since PHP is still in use to create new software projects today, it has evolved as well. There also is an ecosystem around PHP, I’ve heard about something called Composer and I’ve seen a job announcement requiring expertise in the Laravendel framework, so I’m curious to learn more about that.
Leave a comment