Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Covariance & Contravariance in PHP - Full PHP 8 Tutorial
Play lesson

Learn PHP The Right Way - Full PHP Tutorial For Beginners & Advanced - Covariance & Contravariance in PHP - 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

Covariant & Contravariant types are the topic that boggles our minds sometimes. In this video, I try to explain it in more detail the way I wish someone explained it to me when I was learning it because this is one of the topics that was somewhat difficult to grasp in the beginning. 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! 🛠️ TOOLS & SERVICES I USE Digital Ocean Hosting - Get 100$ credit - https://m.do.co/c/38b935ad74e5 Domains on Namecheap - https://namecheap.pxf.io/rnRjdQ Envato Elements - https://1.envato.market/c/2937311/298927/4662 Adobe Photoshop & Premiere - https://clk.tradedoubler.com/click?p=264355&a=3250276 COURSE PLAYLIST https://www.youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe- RESOURCES Docs - https://www.php.net/manual/en/language.oop5.variance.php RFC that added covariant return & contravariant parameter type support - https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters Great article by Nikita Popov about type variance - https://www.npopov.com/2021/11/08/Type-variance-in-PHP.html Another great article about LSP & type safety - https://stitcher.io/blog/liskov-and-type-safety Online PHP Shell - https://3v4l.org/ TABLE OF CONTENTS 00:00 - Covariant & Contravariant Types 01:40 - Return Type Covariance Example 04:38 - Paramter Type Contravariance Example 06:39 - Testing Covariance & Contravariance In PHP 7.3 08:06 - Covariant Parameter & Contravariant Return Type Support? 10:16 - Covariance & Contravariance With Union & Intersection Types 11:48 - Liskov Substitution Principle (LSP) ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

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