Hello.
In this post, I share some of my favorite PHP books that I consider a must read for any PHP developer.
PHP The Right way
There’s a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and insecure code. This book is an easy-to-read, quick reference for PHP popular coding standards, links to authoritative tutorials around the Web and what the contributors consider to be best practices at the present time.
This book aims to introduce new PHP developers to some topics which they may not discover until it is too late, and aims to give seasoned pros some fresh ideas on those topics they’ve been doing for years without ever reconsidering.
If you are new to PHP, reading this book is one of the first things you should do.
The Clean Architecture in PHP
In this book, Kristopher Wilson, cover the Clean Architecture, coined by Uncle Bob, and how to implement it in PHP, as well as the concepts of SOLID design, various design patterns, and a look at various architectures.
If you want to know how to structure your applications in order to be Testable, Refactorable and Easy to work and mantain, this book is for you.
Definitely a must read.
Domain-Driven Design in PHP
I finished reading this book last week and it was really good.
This one focused on how to implement Domain Driven Design in PHP.
It will help you understand how to organize your code using DDD and concepts like Entities, Value Objects, Aggregates, Repositories and more.
This book has lots of code examples that will help understanding the concepts.
Even if you dont want to follow a full DDD Approach, there are great concepts in this book that will help you better organizing your application code.
Scaling PHP Apps
You can make the best application following "Clean Code" or "DDD" approach, but if you cant deploy it live and scale, it will be useless.
This book is more focused on the operational side of PHP and it will explain great techniques, for getting the most of PHP and LEMP stack, from optimizing the application itself to the Webserver, Database, Caching etc.
Build APIs You Won't Hate
While this book is not specific for PHP, Its a very important topic for any Web Development work. Phil Sturgeon talks about the best practices to build a REST API, from more basic stuff like how to structure your endpoints to advanced concepts like HATEOAS.
As a bonus, all the code examples are written in PHP.
Conclusion
Thats it. These are my favorites. This and This also look interesting, but I have only talked about books I have read.
Any other book you would recommend? Feel free to comment.
Top comments (12)
For Goodreads users:
Thanks for the links ;)
php objects patterns and practice by Matt Zandstra
Just a small question : If you create a website using the DDD concept, does it mean it's impossible to a framework like Symfony and it's you who have to write the whole code ?
Not at all. The domain layer is old good PHP, but you can use Symfony to implement all sort of things at the infrastructure level. The key here is to apply the Dependency Inversion Principle.
Okay. As you probably guessed I don't know anything about DDD but I'll try to find some time to read about it.
I would strongly recommend two of the books mentioned here as a good starting points: DDD in PHP and The Clean Architecture.
Would love to build APIs, but have no real books for that.
Sound like some great books Sir, but is there any in this list that is free ? please would love to have it.
Professional PHP by Patrick Louys
Additionally, any writings by Cal Evans blog.calevans.com/
Hi, what would you suggest if I find hard to read DDD in PHP, maybe some starter points?
I just think that I need something to read "before" I can fully comprehend this book.