Learn modern PHP
A curated list of resources for PHP
Table of Contents
- Must read
- Tutorials
- Books
- Online Course
- Reference
- The basics
- Local Development Environments
- Tools
- IDEs
- Frameworks and libraries
- Templates
- OOP
- Best Practices
- Model-View-Controller
- Database
- Standards
- Errors and exception handling
- Debugging
- Unit testing
- Documentation
- Sessions
- Text translations
- Regular Expressions
- XML
- API
- Version control
- Security
- Architecture
- Domain Driven Design (DDD)
- Hexagonal Architecture
- Functional Programming
- Continuous integration and Continuous Delivery
- Magazines
- Merchandise
- Community and News
Must read
Tutorials
- Full PHP 8 Tutorial - Learn PHP The Right Way In 2022
- PHP Front To Back (Videos)
- learn-php.org
- Learn PHP for experienced developers
- PHP For Beginners
- PHP Pandas
- Learn PHP in Y minutes
- PHP Apprentice
- PHP by Example
Books
- Advanced Web Application Architecture
- Building modern applications with PHP 8
- Modern PHP: New Features and Good Practices
- Object Design Style Guide
- Learning PHP 7
- PHP 7 Zend Certification Study Guide
- Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5
- PHP 8 Quick Scripting Reference: A Pocket Guide to PHP Web Scripting
- Programming PHP (O’Reilly Media)
- The Art of Modern PHP 8
Online Course
- CodeAcademy - Learn PHP
- Codecourse
- Exercism - PHP (Code practice and mentorship)
- SymfonyCasts - Build something amazing with PHP
- Treehouse - Learn PHP
- Udemy - PHP
- DevProjects + Codementor (Free PHP projects and optional paid mentorship)
- Free PHP courses
Reference
The basics
PHP Basics
- PHP Developer roadmap - How to Become a PHP Developer
- Getting Started with PHP
- PHP Data Types
- PHP Loops
- Array basics
- Working with Arrays
- PHP GET and POST
- PHP for Beginners (2023 Edition)
The LAMP stack
- The LAMP (Linux, Apache, MySql, PHP) stack
- Linux
- Apache HTTP Server
- MySQL
- PHP
- What is a LAMP Stack? (Video)
HTML / HTML 5
CSS
JavaScript
- JavaScript (aka ECMAScript)
- Basic JavaScript
- JavaScript Tutorial
- Eloquent JavaScript
- You Don’t Know JS (book series)
- Awesome JavaScript Learning
- Learn JavaScript
Protocols
- HTTP and HTTPS
- HTTP Request / Response, GET und POST
- Introduction to HTTP Basics
- FTP
- SSH
- SMTP
- POP3
- IMAP
- Ajax
Local Development Environments
Tools
- Webbrowser (Chrome, Firefox)
- Composer (dependency management)
- WinSCP (Free SFTP, SCP and FTP client)
- Putty (A free SSH and telnet client)
- PoEdit (gettext translations editor)
- Notepad++ (Text editor)
- 7-ZIP (File archiver)
IDEs
Frameworks and libraries
Frameworks
Micro Frameworks
- Slim Framework (A PHP micro framework that helps you quickly write simple yet powerful web applications and APIs)
- Slim Framework 4 - Tutorial
- Slim Framework 4 - eBook
Libraries
Templates
- Plates (A native PHP template system)
- Twig (The flexible, fast, and secure template engine for PHP)
- Twig – the Most Popular Stand-Alone PHP Template Engine
- Twig versus Flat PHP
OOP
Object-oriented programming
“Write shy code -
modules that don’t reveal anything unnecessary to other
modules and that don’t rely on other modules’ implementations.”
- Object-Oriented Principles in PHP
- Classes and Objects
- Mastering Object Oriented PHP (eBook)
- Objektorientierte Programmierung (german)
- Object-Oriented Bootcamp
- Learning OOP in PHP
Design patterns
- Design Patterns in PHP (Laracasts)
- Design Patterns in PHP
- Gang of Four Design Patterns (Book)
- Design Patterns for Humans™
- DesignPatternsPHP
- Several design patterns in PHP
- Design Patterns in PHP Course (Video)
SOLID
SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable
Dependency injection
- An Introduction to Dependency Injection
- What is Dependency Injection?
- The Clean Code Talks - Don’t Look For Things! (Video)
- PSR-11: Container interface
- Demystifying Dependency Injection Containers by Kai Sassnowski (Video)
Best Practices
KISS
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
YAGNI
You Ain’t Gonna Need It
DRY
“DRY ‐ Don’t Repeat Yourself
Every piece of knowledge must have a single,
unambiguous, authoritative representation within a system.”
DRY is about having one source of truth. It’s not about frantically eradicating duplication from your codebase.
Other
- TheCodingMachine Best Practices
- Return early, return often
- Global Variables Are Bad
- Thin controllers and fat models
- PHP Dos and Don’ts aka Programmers I Don’t Like
- Composition over inheritance
- Clean Code PHP
- Object Calisthenics
Model-View-Controller
Most frameworks in PHP follow some sort of MVC structure. The theory is simple:
The user interfaces with the view, which passes information to a controller. The controller then passes that information to a model (layer), and the model passes information back to the controller. The controller effectively stands between the view and the model. (Brandon James Savage)
- MVC Wikipedia
- MVC in simpler terms or the structure of a modern web-application
- MVC overview
- MVC for Noobs
- A Better Understanding Of MVC
- Thin controllers, fat models
- MVC for advanced PHP developers
- A Better Understanding Of MVC
- MVC model 2
- Action Domain Responder (ADR)
Database
Database basics
- Database
- Database model
- Codd’s 12 rules *
- The only proper PDO tutorial
- SQL Tutorial
- Datenbank Grundlagen (german)
- ERM
- Datenbank-Grundlagen Tutorial (german)
- Datenbank-Grundlagen Tutorial: Primärschlüssel (german)
Relational database management system (RDBMS)
Database books
Database normalization
Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
- Database normalization
- First normal form (1NF)
- Second normal form (2NF)
- Third normal form (3NF)
- Description of the database normalization basics
- Der Königsweg: Normalisierung (german)
- Normalisierung (german)
- MySQL - Normalisierung (german)
Prepared Statements
Database libraries
- CakePHP QueryBuilder
- Illuminate (Laravel) Query Builder
- Laminas DB Query Builder
- Phinx - database migrations
Database tools
- SQLyog Community Edition
- SQLyog - The most complete and easy to use MySQL GUI ($)
- MySQL Workbench
- HeidiSQL
- SequelPro
- Navicat ($)
- DBeaver
NoSQL
- NoSQL
- Redis (In-memory data structure store, used as a database, cache and message broker)
- MongoDB (Document-oriented database)
Standards
Follow common PHP conventions for object-oriented code, and established industry best practices: PSR-1, PSR-12, PSR-4.