<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/four-out-of-five-0p880vrtn" -->

---
title: Four out of five | daily.dev
description: Sebastian Bergmann evaluates PHP's standing against the consensus criteria of modern language design — closures, objects, pattern matching, and type...
canonical: https://daily.dev/posts/four-out-of-five-0p880vrtn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Four out of five | daily.dev
og:description: Sebastian Bergmann evaluates PHP's standing against the consensus criteria of modern language design — closures, objects, pattern matching, and type...
og:url: https://daily.dev/posts/four-out-of-five-0p880vrtn
og:image: https://api.daily.dev/og/posts/0p880vrtn.png
og:image:alt: Four out of five
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Four out of five

**[PHPUnit Expert](https://daily.dev/sources/phpunit-expert)** · 9 min read · 5 upvotes · 1 comments

## Summary

Sebastian Bergmann evaluates PHP's standing against the consensus criteria of modern language design — closures, objects, pattern matching, and type parametricity — using the Rhombus language's goal statement as a framework. PHP 8.5 and 8.6 bring partial function application, pipe operator, clone-with, and URI extensions. Pattern matching via the RFC by Garfield and Tovilo is in progress but missed PHP 8.6, likely landing in 8.7. On generics, erased generics were deliberately rejected to preserve PHP's runtime-checked type invariant; runtime-checked generics are the planned path. The docblock type language (PHPStan/Psalm) serves as PHP's de facto extensibility mechanism, delivering generics and shape types without RFC votes. Bergmann concludes PHP scores four out of five on the modern language checklist, with strong domain-fit for web workloads through its shared-nothing execution model, secure session defaults, and correct URL parsing in the standard library.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://phpunit.expert/articles/four-out-of-five.html>

## Questions this post answers

### What does partial function application look like in PHP 8.6?

PHP 8.6 introduces partial function application using a placeholder syntax like strlen(?), which produces a closure with a hole that can be filled later. Combined with the pipe operator introduced in PHP 8.5, this gives PHP genuine function composition. The same release also infers closures as static when they don't use $this and caches fully stateless closures between uses for performance.

_Developers tracking PHP 8.6 closure changes can follow release breakdowns like this on daily.dev._

### Why was the bound-erased generics proposal rejected for PHP 8.6?

The proposal was declined because erasure without a mandatory separate compile-time type-checking step would break PHP's long-standing invariant that native types are checked at runtime since PHP 5.0. Languages like Java and TypeScript get away with erasure because they require compilation before execution; PHP has no such step, and static analysis tools like PHPStan and Psalm are used by well under half of PHP developers according to the JetBrains Developer Ecosystem Survey.

_Anyone deciding whether to bet on generics support can track PHP internals debates like this via daily.dev._

### What new features does the PHP Pattern Matching RFC by Larry Garfield and Ilija Tovilo add?

The RFC introduces an 'is' operator for structural pattern matching, supporting type patterns like $value is int|float, object patterns with property matching and variable binding such as $p is Point(x: 3, y: $y), and array shape patterns like $request is ['action' => string, 'id' => int, ...]. It also proposes combining these into a match($value) is {...} construct, and is explicitly a stepping stone toward algebraic data types; it missed the PHP 8.6 window and is expected around PHP 8.7.

_Developers weighing when to adopt structural matching in PHP can follow RFC progress like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> Try adding an escape hatch for repeated generic checks

## Similar posts on daily.dev

- [PHP in 2026](https://daily.dev/posts/php-in-2026-lsdo240ed) · stitcher.io · 123 upvotes · 3 comments
- [A language has non-functional requirements, too](https://daily.dev/posts/a-language-has-non-functional-requirements-too-a7lpt41ye) · PHPUnit Expert · 5 upvotes · 0 comments
- [What's new in PHP 8.6](https://daily.dev/posts/what-s-new-in-php-8-6-eixar55ou) · stitcher.io · 103 upvotes · 7 comments
- [My wishlist for PHP in 2026](https://daily.dev/posts/my-wishlist-for-php-in-2026-1f3gibyag) · stitcher.io · 39 upvotes · 1 comments

---

Tags: [#php](https://daily.dev/tags/php), [#phpstan](https://daily.dev/tags/phpstan)

[View this post on daily.dev](https://daily.dev/posts/four-out-of-five-0p880vrtn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Four out of five","url":"https://daily.dev/posts/four-out-of-five-0p880vrtn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/four-out-of-five-0p880vrtn"},"datePublished":"2026-08-12T05:07:16.472Z","dateModified":"2026-09-13T20:08:48.326Z","description":"Sebastian Bergmann evaluates PHP's standing against the consensus criteria of modern language design — closures, objects, pattern matching, and type...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/125ebade5d1f46ff0aba17e158ea0d97?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/125ebade5d1f46ff0aba17e158ea0d97?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"PHPUnit Expert","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"PHPUnit Expert","logo":"https://media.daily.dev/image/upload/s--FMZoysoG--/f_auto,q_auto/v1774964057/logos/phpunit-expert?_a=BAMAMiWQ0","url":"https://daily.dev/sources/phpunit-expert"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/four-out-of-five-0p880vrtn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"php,phpstan","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PHPUnit Expert","item":"https://daily.dev/sources/phpunit-expert"},{"@type":"ListItem","position":3,"name":"Four out of five"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/four-out-of-five-0p880vrtn","comment":[{"@type":"Comment","text":"Try adding an escape hatch for repeated generic checks","datePublished":"2026-08-18T04:09:32.998Z","url":"https://daily.dev/posts/0p880vrtn#c-PPZe5WOnG","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/four-out-of-five-0p880vrtn#faq","mainEntity":[{"@type":"Question","name":"What does partial function application look like in PHP 8.6?","acceptedAnswer":{"@type":"Answer","text":"PHP 8.6 introduces partial function application using a placeholder syntax like strlen(?), which produces a closure with a hole that can be filled later. Combined with the pipe operator introduced in PHP 8.5, this gives PHP genuine function composition. The same release also infers closures as static when they don't use $this and caches fully stateless closures between uses for performance. Developers tracking PHP 8.6 closure changes can follow release breakdowns like this on daily.dev."}},{"@type":"Question","name":"Why was the bound-erased generics proposal rejected for PHP 8.6?","acceptedAnswer":{"@type":"Answer","text":"The proposal was declined because erasure without a mandatory separate compile-time type-checking step would break PHP's long-standing invariant that native types are checked at runtime since PHP 5.0. Languages like Java and TypeScript get away with erasure because they require compilation before execution; PHP has no such step, and static analysis tools like PHPStan and Psalm are used by well under half of PHP developers according to the JetBrains Developer Ecosystem Survey. Anyone deciding whether to bet on generics support can track PHP internals debates like this via daily.dev."}},{"@type":"Question","name":"What new features does the PHP Pattern Matching RFC by Larry Garfield and Ilija Tovilo add?","acceptedAnswer":{"@type":"Answer","text":"The RFC introduces an 'is' operator for structural pattern matching, supporting type patterns like $value is int|float, object patterns with property matching and variable binding such as $p is Point(x: 3, y: $y), and array shape patterns like $request is ['action' => string, 'id' => int, ...]. It also proposes combining these into a match($value) is {...} construct, and is explicitly a stepping stone toward algebraic data types; it missed the PHP 8.6 window and is expected around PHP 8.7. Developers weighing when to adopt structural matching in PHP can follow RFC progress like this on daily.dev."}}]}
```

