International PHP Conference |
May 25 – 29, 2020 in Berlin

A Case for Generics in PHP

Session
This talk originates from the archive. To the CURRENT program
Until March 19: ✓ PS Classic or C64 for free ✓ Group discount ✓ Save up to € 520 Register now

More talks in the program:

Infos
Tuesday, June 4 2019
11:45 - 12:30

Avoiding surprise-ducks at run-time … PHP 7 has brought us improved support for types, making us less reliant upon annotations. Yet we still can’t say function foo() : User[] What makes an array of users so special? What if we’d like to return a HashMap of a given key & value? We’ll explore use cases for defining composite objects and leveraging generics to avoid repeating ourselves .In 2016, Ben Scholzen and Rasmus Schultz drafted an RFC for "Generics in PHP". Having worked with these constructs in Java and C# in past lives, I can offer several examples of practical use-cases for them, and help bolster a case for their adoption in PHP. In the end, we should arrive at how they would nicely complement the most recent enhancements to PHP 7’s type system.

Stay tuned!

Behind the Tracks of IPC

PHP Core Technology
Best Practices & Application

General Web Development
General Web Development & more

Agile & Company Culture
Agility has become mainstream

Software Architecture
Concepts & Environments

Security
All about Web Security

Testing & Test Driven Development
An overview of the most important topics

DevOps & Continuous Delivery
DevOps is a philosophy

Docker, Kubernetes, Cloud
An overview of the most important topics

#slideless (pure coding)
An overview of the most important topics

PHP Frameworks
An overview of the most important topics

Content Management Systems
An overview of the most important topics