Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

PHP Traits, Threat or Treat?

PHP UK Conference via YouTube

Overview

Explore the power of PHP Traits in this 39-minute conference talk from PHP UK Conference 2013. Discover how to reduce complexity and reuse method sets across independent classes in different hierarchies. Delve into the semantics of traits, comparing PHP with Java, and understand the reasons behind slow and fast adoption rates. Learn about array short notation, root broker, multiple inheritance, and static methods in PHP. Examine method visibility, interface compliance, abstraction techniques, and the use of magic constants. Investigate the pros and cons of traits, including benchmarks and potential pitfalls. Gain insights into upgrading to PHP 5.4 and prepare for the future of PHP development.

Syllabus

Intro
PHP vs Java
PHP Version Adoption
Why is there a slow adoption
Why would you adopt
Array Short Notation
Root Broker
Multiple Inheritance
PHP Traits
Multiple PHP Statics
PHP Methods Visibility
Interfaced Compliance
Interface Set Options
Abstraction
Magic Constant
Outer Loading
The Bad
Benchmarks
Upgrade
PHP 54

Taught by

PHP UK Conference

Reviews

Start your review of PHP Traits, Threat or Treat?

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.