Build a PHP Framework: Interfaces

Опубликовано: 26 Июль 2026
на канале: Dave Hollingworth
1,907
112

In this video you'll learn how straightforward it is to swap one class for another when they implement the same interface in PHP. This is something that PHP frameworks like Laravel and Symfony make use of extensively.

This is the sixth in a series of videos that will teach you how frameworks work in PHP by building one step by step. In this project-based tutorial, I'll be doing this using modern standards, best practices and third party packages where necessary.

In order to follow along you need to already be familiar with basic PHP.

   • Build a PHP Framework  

☕ Support me: https://ko-fi.com/davehollingworth

🌐 Recommended host: https://davehollingworth.com/hosting

💻 Source code: https://github.com/daveh/php-framewor...

🌐 PSR-7 package used: https://packagist.org/packages/nyholm...

00:00 Introduction
01:33 Alternative PSR-7 package
03:36 Mixing implementations
04:12 PSR-7 interface
04:35 Type hint to interfaces
06:02 Conclusion

#PHP #framework #laravel #symfony