Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
PHP Traits - How They Work & Drawbacks - Full PHP 8 Tutorial
Play lesson

Learn PHP The Right Way - Full PHP Tutorial For Beginners & Advanced - PHP Traits - How They Work & Drawbacks - Full PHP 8 Tutorial

Master PHP 8 in Style: From Basics to Building Dynamic Apps with Program With Gio

4.0 (0)
14 learners

What you'll learn

Learn to install and configure PHP and web servers effectively
Understand and utilize PHP data types and operators for code efficiency
Master PHP's OOP concepts, including classes, interfaces, and inheritance
Implement security measures like CSRF, XSS protection, and session management

This course includes

  • 34.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this video, you will learn all you need to know about traits in PHP with examples & in-depth explanations. You'll learn what problems traits solve as well as the problems it can introduce. 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: https://www.patreon.com/programwithgio THANK YOU! LESSON 2.14 Course Outline - https://github.com/ggelashvili/learnphptherightway-outline Course Playlist - https://www.youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe- RESOURCES https://www.php.net/manual/en/language.oop5.traits.php CHAPTERS 00:00 - Intro 00:27 - Multiple inheritance problem 02:02 - Overview of coffee maker example in code 03:08 - Using interfaces instead of multiple inheritance 05:43 - Creating & using traits 08:22 - How do traits work? 08:39 - Method precedence 11:02 - Conflict resolution ("insteadof" & "as" operators) 13:38 - Changing visibility of trait methods 16:02 - Composing traits from other traits 16:46 - Properties within traits 20:40 - Abstract methods in traits 23:19 - Static properties & methods in traits 25:38 - Magic __CLASS__ constant in traits 26:13 - Personal opinion & downsides of traits 28:46 - Example comparing inheritance & traits

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere