The Objection

"PHP isn't modern"

Your Quick Response

"PHP 8.x is a completely different language from PHP 5. It now has attributes, enums, named arguments, union/intersection types, match expressions, readonly properties, fibers for async, and much more. Modern PHP follows PSR standards, uses Composer for dependency management, and supports proper OOP with interfaces, traits, and type safety. The language you remember from 2010 doesn't exist anymore."

Modern PHP Features

PHP 8.0 November 2020
Named Arguments

Pass arguments by name for clarity

Attributes

Native annotations/decorators

Union Types

int|string type declarations

Match Expression

Type-safe switch alternative

Constructor Promotion

Concise property declarations

Nullsafe Operator

$obj?->method()

PHP 8.1 November 2021
Enums

First-class enum support

Fibers

Async/concurrent programming

Readonly Properties

Immutable property support

Intersection Types

A&B type constraints

First-class Callables

$fn = $obj->method(...)

Never Return Type

Functions that never return

PHP 8.2 December 2022
Readonly Classes

Entire classes as immutable

DNF Types

(A&B)|null

true/false/null Types

Standalone type declarations

Constants in Traits

Trait constant support

PHP 8.3 November 2023
Typed Class Constants

const string NAME

#[\Override] Attribute

Explicit method overriding

Dynamic Class Constant Fetch

$class::{$name}

json_validate()

Native JSON validation

PHP 8.4 November 2024
Property Hooks

Native getters/setters on properties

Asymmetric Visibility

public private(set)

#[\Deprecated] Attribute

Native deprecation support

new without parentheses

new Foo()->bar()

Lazy Objects

Native lazy initialization

New Array Functions

array_find, array_any, array_all

PHP 8.5 November 2025 (upcoming)
Pipe Operator

$x |> fn($v) => ...

Clone with

clone $obj with {...}

array_first/array_last

Native first/last element access

Closures in const

Arrow functions as constants

PHP-FIG & Interoperability Standards

PHP Framework Interop Group (PHP-FIG)

The PHP-FIG is a group of established PHP projects whose goal is to talk about commonalities and find ways to work together. They create PHP Standards Recommendations (PSRs) that enable framework-agnostic code.

Autoloading & Coding

  • PSR-1 - Basic Coding Standard
  • PSR-4 - Autoloading Standard
  • PSR-12 - Extended Coding Style

HTTP & Middleware

  • PSR-7 - HTTP Message Interfaces
  • PSR-15 - HTTP Handlers
  • PSR-17 - HTTP Factories
  • PSR-18 - HTTP Client

Infrastructure

  • PSR-3 - Logger Interface
  • PSR-6/16 - Caching Interfaces
  • PSR-11 - Container Interface
  • PSR-14 - Event Dispatcher

Why this matters: PSRs enable true interoperability. You can swap Monolog for any PSR-3 logger, use Guzzle or Symfony HttpClient interchangeably (PSR-18), or mix framework components freely. This is enterprise-grade standardization that many ecosystems lack.

Modern PHP Tooling

Package Management

  • Composer - Dependencies
  • Packagist - 400k+ packages

Static Analysis

  • PHPStan - Type checking
  • Psalm - Type inference
  • Rector - Automated refactoring

Code Quality

  • PHP CS Fixer - Code style
  • PHPUnit - Testing
  • Infection - Mutation testing

Performance

  • OPcache - Bytecode caching
  • Blackfire - Profiling
  • FrankenPHP - App server

Key Talking Points

  • PHP 8.x has enums, attributes, fibers, and union types
  • PHP-FIG's PSR standards enable true framework interoperability
  • Annual releases bring consistent language improvements
  • The PHP 5 era is completely different from modern PHP