CANCEL
Subscription
0
Your Cart
(0 item)
You have no products in your basket yet
Save more on your purchases!
Buy 2 products and get 15% off
Buy 3-4 products and get 20% off
Buy 5+ products and get 30% off
Savings automatically calculated. No voucher code required.
Checkout
Account
Sign in
New User?
Create Account
Your Account
Your Orders
Change country
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Canary Islands
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
SALE ENDS IN
0
Days
:
00
Hours
:
00
Minutes
:
00
Seconds
GO TO
TOP
You're reading from
Clean Code in PHP
Expert tips and best practices to write beautiful, human-friendly, and maintainable PHP
Product type
Paperback
Published in
Oct 2022
Publisher
Packt
ISBN-13
9781804613870
Length
264 pages
Edition
1st Edition
Languages
PHP
Tools
Symfony
Concepts
Server Side Web Development
Authors (2):
Alexandre Daubois
Alexandre Daubois
Alexandre Daubois
Alexandre Daubois is a Symfony Developer at SensioLabs, the company that created Symfony.
Read more
Carsten Windler
Carsten Windler
Carsten Windler
Carsten Windler is a Lead PHP engineer at Plan A.
Read more
View More author details
Table of Contents
(18) Chapters
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Share Your Thoughts
1. Part 1 – Introducing Clean Code
2. Chapter 1: What Is Clean Code and Why Should You Care?
FREE CHAPTER
What this book will cover
Understanding what clean code is
The importance of clean code in teams
The importance of clean code in personal projects
Summary
3. Chapter 2: Who Gets to Decide What “Good Practices” Are?
Who decides these things anyway?
Best practices – where do they really come from?
Being context-aware
Being consistent – get results quicker
Summary
4. Chapter 3: Code, Don’t Do Stunts
Understanding code
Be understood, not clever
A note on maintainability
Summary
5. Chapter 4: It is about More Than Just Code
PHP as an ecosystem
Choosing the right libraries
A word about semantic versioning
Stability versus trends
Summary
6. Chapter 5: Optimizing Your Time and Separating Responsibilities
Naming and organizational conventions
Separating responsibilities
Demystifying polymorphism – interfaces and abstract classes
Summary
7. Chapter 6: PHP is Evolving – Deprecations and Revolutions
Old versus new PHP
The version 8 revolution
Summary
8. Part 2 – Maintaining Code Quality
9. Chapter 7: Code Quality Tools
Technical requirements
Syntax checking and code styling
Static Code Analysis
IDE extensions
Summary
Further reading
10. Chapter 8: Code Quality Metrics
Technical requirements
Introducing code quality metrics
Gathering metrics in PHP
The pros and cons of using metrics
Summary
Further reading
11. Chapter 9: Organizing PHP Quality Tools
Technical requirements
Installing code quality tools using Composer
Installing code quality tools as phar files
Managing phar files using Phive
Summary
12. Chapter 10: Automated Testing
Technical requirements
Why you need automated tests
Types of automated tests
About code coverage
Summary
Further reading
13. Chapter 11: Continuous Integration
Technical requirements
Why you need CI
The build pipeline
Building a pipeline with GitHub Actions
Your local pipeline – Git hooks
Excursion – Adding CI to existing software
An outlook on CD
Summary
Further reading
14. Chapter 12: Working in a Team
Technical requirements
Coding standards
Coding guidelines
Code reviews
Design patterns
Summary
Further reading
15. Chapter 13: Creating Effective Documentation
Technical requirements
Why documentation matters
Creating documentation
Inline documentation
Summary
Further reading
16. Index
Why subscribe?
17. Other Books You May Enjoy
Packt is searching for authors like you
Further reading
https://google.github.io/eng-practices/review
provides you with more information about the
code review
process at Google
Useful sources about
design patterns
in PHP:
https://refactoring.guru/design-patterns/adapter/php/example
https://sourcemaking.com/design_patterns/adapter/php
https://designpatternsphp.readthedocs.io/en/latest/README.html
The rest of the chapter is locked
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Start free trial
Previous Section
Section 8 of 8
Next Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Sign up now
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Start free trial
Renews at
€18.99/month
. Cancel anytime
Authors (2)
Carsten Windler
Carsten Windler
Carsten Windler is a Lead PHP engineer at Plan A.
Read more
See other products by Carsten Windler
Alexandre Daubois
Alexandre Daubois
Alexandre Daubois is a Symfony Developer at SensioLabs, the company that created Symfony.
Read more
See other products by Alexandre Daubois
Personalised recommendations for you
Based on your interests and search pattern
Modern Full-Stack React Projects
Read more
Full-Stack React Projects is a complete guide to learning full-stack web development, understanding the creation and integration of backend systems, and advancing your career as a frontend developer.
Read more
Jun 2024
16h 52m
Mastering Node.js Web Development
Read more
Explore Node.js with practical examples that will teach you how to utilize open-source packages for real-world solutions. Gain the skills to develop and deploy server-side applications that enhance your client-side projects.
Read more
Jun 2024
25h 56m
Reactive Patterns with RxJS and Angular Signals
Read more
This RxJS book will help you understand the core concepts of RxJS and provide practical patterns to make your code more reactive and declarative. You'll also understand Angular Signals, which provide another way to improve code reactivity.
Read more
Jul 2024
8h 28m
API Testing and Development with Postman
Read more
Whether you are a tester or a developer working with APIs, you'll be able to put your knowledge to work with this practical guide to using Postman. The book provides a hands-on approach to implementing and learning the associated methodologies that will have you up-and-running and productive in no time.
Read more
Jun 2024
11h 56m
FastAPI Cookbook
Read more
This book helps you unlock the power of FastAPI to build high-performing web apps and APIs by taking you through the basics like routing and data validation through to advanced topics, such as custom middleware and WebSockets.
Read more
Aug 2024
11h 56m
Mastering Spring Boot 3.0
Read more
This hands-on guide empowers you to develop scalable and efficient applications. You'll also learn microservices patterns, reactive programming, and security measures for building robust backend systems.
Read more
Jun 2024
8h 32m
Nuxt 3 Projects
Read more
This book is a comprehensive guide to Nuxt.js, which takes you from the basics to advanced topics. Uniquely, this book emphasizes practical, project-based learning, tackling real-world problems.
Read more
Jun 2024
7h 40m
Vue.js 3 for Beginners
Read more
Learning a new language by following video tutorials, blog posts, and documentation is a tiresome activity. This book will take you on an exciting journey of becoming a proficient Vue.js developer through a practical, step-by-step approach.
Read more
Sep 2024
10h 4m
Full-Stack Web Development with TypeScript 5
Read more
The book emphasizes best practices, debugging, performance optimization, and scalable code structure, helping you develop practical skills in frontend and backend development, database integration, and AI integration.
Read more
Aug 2024
9h 4m
Mastering Flask Web and API Development
Read more
The book is an introduction to Flask that will showcase its baseline, core, and advanced integration features to enable you to solve enterprise-related problems and issues in both web and API development.
Read more
Aug 2024
16h 28m