Uploaded April 2021 | Updated November 2026, 2 hours ago
In this video, you'll learn about PHP's magic methods, how they work & when they get called. Magic methods are exactly what they are called, they are "magic" in a way that you don't call these methods the way you call regular methods. Instead, these magic methods get triggered automatically after a certain action or event.
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
π Smash the like button
π€ Subscribe to the channel & turn the notifications on
π¬ Post comments, any feedback is greatly appreciated
β Become a Patreon: patreon.com/programwithgio
THANK YOU!
LESSON 2.12
Course Outline - github.com/ggelashvili/learnphptherightway-outline
Course Playlist - youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe-
RESOURCES
Lesson That Includes Constructors & Destructors - youtu.be/6FW72q5fIx8
Resources - php.net/manual/en/language.oop5.magic.php
CHAPTERS
00:00 - Magic methods
00:49 - __get & __set
05:21 - __isset & __unset
07:45 - __call & __callStatic
11:51 - __toString
13:45 - __invoke
15:08 - __debugInfo
In this video, you'll learn about PHP's magic methods, how they work & when they get called. Magic methods are exactly what they are called, they are "magic" in a way that you don't call these methods the way you call regular methods. Instead, these magic methods get triggered automatically after a certain action or event.
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
π Smash the like button
π€ Subscribe to the channel & turn the notifications on
π¬ Post comments, any feedback is greatly appreciated
β Become a Patreon: patreon.com/programwithgio
THANK YOU!
LESSON 2.12
Course Outline - github.com/ggelashvili/learnphptherightway-outline
Course Playlist - youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe-
RESOURCES
Lesson That Includes Constructors & Destructors - youtu.be/6FW72q5fIx8
Resources - php.net/manual/en/language.oop5.magic.php
CHAPTERS
00:00 - Magic methods
00:49 - __get & __set
05:21 - __isset & __unset
07:45 - __call & __callStatic
11:51 - __toString
13:45 - __invoke
15:08 - __debugInfo










