DEV Community

Bruno Paz
Bruno Paz

Posted on • Updated on • Originally published at brunopaz.dev

My Favorite PHP books

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

Imgur

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

Imgur

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

Imgur

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

Imgur

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

Imgur

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.

Discussion (13)

Collapse
Collapse
brpaz profile image
Bruno Paz Author

Thanks for the links ;)

Collapse
euthimios profile image
Euthimios

php objects patterns and practice by Matt Zandstra

Collapse
tofl profile image
Tom F.

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 ?

Collapse
franiglesias profile image
Fran Iglesias • Edited

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.

Collapse
tofl profile image
Tom F.

Okay. As you probably guessed I don't know anything about DDD but I'll try to find some time to read about it.

Thread Thread
franiglesias profile image
Fran Iglesias

I would strongly recommend two of the books mentioned here as a good starting points: DDD in PHP and The Clean Architecture.

Collapse
david_j_eddy profile image
David J Eddy

Additionally, any writings by Cal Evans blog.calevans.com/

Collapse
shinyuy profile image
Shinyuy Marcel

Sound like some great books Sir, but is there any in this list that is free ? please would love to have it.

Collapse
jandev profile image
Jan

Professional PHP by Patrick Louys

Collapse
shinyuy profile image
Shinyuy Marcel

Would love to build APIs, but have no real books for that.

Collapse
asiros profile image
Chonbashev Artyk

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.