PHP 8.6 First Look: What’s Coming and What’s Leaving ![rw-book-cover](https://d34adp677peecb.cloudfront.net/static/images/article4.6bc1851654a0.png) 🔗 **Source:** [PHP 8.6 First Look: What’s Coming and What’s Leaving](https://www.youtube.com/watch?v=vmSiuI2tVQ4) > [!note]+ Document Notes > tags: [php-8-6, partial-function-application, readonly-properties, polling-api, session-security, deprecations] > author: Brent Roose > source: PHP Annotated (YouTube) / stitcher.io > reference: https://www.youtube.com/watch?v=vmSiuI2tVQ4 > date created: 2026-08-11 > > > [!info] Generated analysis — not the author's words. Sections below are machine-written > > from the captured source. Only text inside `> [!quote]` blocks is verbatim from the author. > > Do not quote or attribute any other line to the named author. > > # 🏷️ Title: PHP 8.6 First Look: What's Coming and What's Leaving > <!-- deep-read:sections start --> ## 🧭 Table of Contents - [📝 Summary](#-summary) - [📖 Main Content](#-main-content) - [🗒️ Notes](#️-notes) - [📚 References](#-references) - [🗣️ Paraphrase](#️-paraphrase) - [📰 Newsletter](#-newsletter) - [✅ Action Items](#-action-items) - [🧪 Hypotheses](#-hypotheses) - [📊 Methodology](#-methodology) - [❓ Questions](#-questions) - [🔮 Future Research](#-future-research) - [💡 Implications](#-implications) - [🧠 Learning Styles Assessment](#-learning-styles-assessment) - [📊 Accessibility Assessment](#-accessibility-assessment) - [🌍 DEIB Assessment](#-deib-assessment) - [✅ Logical Validity](#-logical-validity) - [🛡️ DARVO Analysis](#-darvo-analysis) - [🎯 Conclusion](#-conclusion) ### 🔗 References - [What's new in PHP 8.6 | stitcher.io](https://stitcher.io/blog/new-in-php-86) - [Partial function application in PHP 8.6 | stitcher.io](https://stitcher.io/blog/php-86-partial-function-application) - [PHP 8.6 kicks off with partial function application | The PHP Foundation](https://thephp.foundation/blog/2025/12/08/partial-application/) - [PHP 8.6: What's New and Changed | PHP.Watch](https://php.watch/versions/8.6) ## 📝 Summary - PHP 8.6 (targeting GA around November 19, 2026) is nearing feature freeze; the video is a "first look" roundup of confirmed features and deprecations. - Headline feature is partial function application (PFA) — creating a reference to a function with some parameters pre-filled — which the presenter frames as the fix that finally makes the pipe operator (added a prior release) practical without wrapper closures. - Other confirmed additions: readonly property defaults (unlocked by PHP 8.4's property hooks), a built-in `clamp()` function, function-parameter-level doc comments, and more secure session defaults (strict mode on, cookies `HttpOnly`, `SameSite=Lax`). - The polling API is explicitly downplayed — the presenter warns viewers not to expect it to enable "better async code"; it's mainly a lower-level primitive for frameworks like Amp and ReactPHP. - Roughly 20 deprecations ship in this cycle; the presenter expects community pushback but argues deprecations are healthy language evolution, made low-friction by tools like Rector and Mago. - Stakeholders: PHP core/RFC voters, framework maintainers (Amp, ReactPHP, and pipe-operator consumers), hosting providers (session default changes), and WordPress/plugin ecosystems that eventually inherit PHP's minimum-version floor. - Risks/tradeoffs: deprecation fatigue and backlash vs. long-term maintainability; new session defaults could silently change behavior for legacy code depending on loose session handling. - Bottom line: an incremental but ergonomics-focused release — PFA is the standout, everything else is quality-of-life or security-hardening. ## 📖 Main Content - **Partial function application (PFA):** lets a developer create a reference to a function with some parameters already filled in, without hand-writing a wrapper closure. Its main payoff is with the pipe operator, which requires a single-parameter closure at each stage — previously forcing awkward wrapper functions. ```php // Illustrative, not from the transcript — one fenced block per document policy $result = $value |> str_replace(' ', '-', ...); // PFA pre-fills two of three params ``` - **Readonly property defaults:** previously nonsensical (a readonly property with a default is functionally a constant). PHP 8.4's property hooks changed that — hooks can now be declared on interfaces, so a single readonly property can resolve differently per implementation, making a default value meaningful again. - **Polling API:** explicitly *not* a new concurrency model — it's positioned as a lower-level replacement for existing mechanisms, mainly useful to frameworks like Amp/ReactPHP, with possible (not guaranteed) performance gains. - **`clamp()`:** bounds a value to a min/max range, snapping to the nearest edge if out of bounds; notable for working across ints, floats, strings, and dates, not just numerics. - **Function parameter doc comments:** lets docblocks attach directly to individual parameters instead of one block of `@param` tags on the function. Presenter is ambivalent — expects an adjustment period. - **Session hardening:** `session.use_strict_mode` and equivalent cookie flags default to more secure values (`HttpOnly` on, `SameSite=Lax`) — an opinionated, security-by-default change rather than a new API. - **Deprecations:** ~20 in this cycle. Presenter's stance: deprecations are a healthy evolution mechanism, and tooling (Rector, Mago) has largely solved the historical pain of migrating a codebase off them. - **Uncertainty/contested claims:** the presenter self-flags two open questions rather than asserting confidence — whether function-parameter doc comments will feel ergonomic once adopted, and whether PFA will be as transformative in practice ("time will have to tell"). ## 🗒️ Notes Source has no embedded timestamps (plain narration transcript, not a captioned VTT/SRT), so notes are organized by feature topic rather than timecode. #### Partial function application - Framed as "the missing feature that should have been added ... a year ago" — implies the presenter sees it as overdue relative to the pipe operator's original release. - Dedicated follow-up video promised — treat this note as provisional pending that deeper coverage. #### Readonly property defaults - Causal chain worth preserving: property hooks (8.4) → hooks definable on interfaces → multiple implementations can vary a "readonly" value → defaults become meaningful again (8.6). This is a genuine cross-version dependency, not a standalone feature. #### Polling API - Presenter explicitly counters likely audience over-expectation ("I want you to not overhype it") — a deliberate expectation-management framing, useful to preserve verbatim-adjacent for anyone citing this video. #### clamp() function - Framed as filling a gap userland/frameworks had already patched — signals PHP core absorbing a common convenience pattern rather than inventing new capability. #### Sessions and deprecations - Security defaults change is presented as uncontroversial; deprecations are pre-emptively defended, suggesting the presenter anticipates the deprecation list to be the most contested part of this release cycle. ## 📚 References - [PHP 8.6 kicks off with partial function application | The PHP Foundation](https://thephp.foundation/blog/2025/12/08/partial-application/) - [What's new in PHP 8.6 | stitcher.io](https://stitcher.io/blog/new-in-php-86) - [Partial function application in PHP 8.6 | stitcher.io](https://stitcher.io/blog/php-86-partial-function-application) - [PHP 8.6: What's New and Changed | PHP.Watch](https://php.watch/versions/8.6) ## 🗣️ Paraphrase - PHP 8.6 is close enough to feature freeze that its shape is now known: partial function application headlines the release, finally making the pipe operator practical by letting developers pre-fill some of a function's parameters instead of writing throwaway wrapper closures. Readonly property defaults round out a change started in 8.4 — property hooks made interface-level readonly properties meaningfully variable across implementations, so a default value stopped being a contradiction in terms. - The polling API is real but modest — a lower-level primitive mostly useful to async framework authors, not a new way to write concurrent PHP. `clamp()` and per-parameter doc comments are smaller ergonomic wins, and session handling gets more secure defaults out of the box. The presenter's biggest editorial point is about the ~20 deprecations: expects backlash, argues it's unwarranted given how mature deprecation tooling (Rector, Mago) has become. ## 📰 Newsletter PHP 8.6 is shaping up nicely, and if you've been waiting for the pipe operator to stop requiring wrapper-closure gymnastics, partial function application is your answer. Brent Roose's first-look walkthrough also covers readonly property defaults (thank property hooks for that one), a long-overdue built-in `clamp()`, and more secure session cookie defaults — worth a skim before your hosts start shipping 8.6 betas. Bookmark it for the WordPress-compatibility angle: session default changes and the deprecation list are exactly the kind of thing that quietly breaks a plugin nobody's touched in three years. [Watch the video](https://www.youtube.com/watch?v=vmSiuI2tVQ4) · [Read the companion post on stitcher.io](https://stitcher.io/blog/new-in-php-86). ## ✅ Action Items #### DevRel - Education: the video's "first look + dedicated deep-dive follow-ups" structure (separate videos already exist/planned for PFA and the polling API) is a reusable content pattern for WP major-release education. - Developer experience, developer marketing, community management, cross-project: not applicable — source is upstream PHP language content with no WordPress-specific developer-experience surface to act on yet. #### OSPO - Security Management: session default hardening (strict mode, `HttpOnly`, `SameSite`) is worth a note in any org-level PHP-upgrade security checklist once 8.6 reaches RC. - Policy & Governance, License Compliance, Software Inventory, Developer Support, Community Engagement, Strategic Alignment: not applicable — no governance or compliance content in this source. #### Community - Not applicable to this source — no community program, contributor, or sponsor content; this is a solo language-feature explainer. #### WordPress - Core: track PHP 8.6 compatibility (readonly defaults, session ini flips, ~20 deprecations) ahead of core's PHP support-matrix update; run core's test suite against 8.6 alpha/beta once available. - Core Performance: evaluate `clamp()`/PFA as replacements for existing userland helpers once 8.6 becomes a viable minimum floor (years out — tracking ticket only). - Core AI: not applicable. - Core Program Team: add an 8.6 deprecation-and-security-defaults briefing to the next cross-team compatibility sync. - Mobile: not applicable. - Playground: add a PHP 8.6 WASM build once upstream ships one, to demo PFA/`clamp()`/session-default changes in-browser. - Community: not applicable — covered under the top-level Community section above. - Training: update PHP-fundamentals lesson plans to cover PFA + the pipe operator once WP's minimum PHP catches up. - Marketing: not applicable. - Support: pre-stage a KB note on the new session cookie defaults (`HttpOnly`/`SameSite`) before hosts ship 8.6 — login/cookie behavior changes are a predictable support spike. - Design: not applicable. - Documentation: flag for a future DevHub PHP-compatibility note; nothing actionable until 8.6 reaches GA. - Photos: not applicable. - TV: not applicable. - Polyglots: not applicable. - Accessibility: not applicable. - Meta: not applicable. - CLI: confirm WP-CLI's PHP-version detection handles 8.6 correctly once RCs are out. - Hosting: flag the `session.use_strict_mode` / `cookie_httponly` / `SameSite` default flips for hosting partners — could change behavior for legacy plugins relying on loose session handling. - Tide: not applicable. - Openverse: not applicable. - Themes: not applicable. - Plugins: add PHP 8.6 to the plugin-review deprecation-scan checklist once RCs land, mirroring prior major-version prep. #### The WPOCC - Not applicable to this source — no WPOCC program, funding, or governance content. ### FAIR - Not applicable to this source — no AT Protocol, provenance, or funding-covenant content. ## 🧪 Hypotheses - H1: Codebases already using the pipe operator will show a measurable drop in single-use wrapper-closure declarations after adopting PFA. - H2: Readonly-property-default adoption will correlate with prior property-hook usage in the same codebase, since the feature is only meaningful in that context. - H3: The default-secure session settings (strict mode, `HttpOnly`, `SameSite=Lax`) will reduce a measurable share of session-fixation/cookie-theft findings in PHP security scans post-8.6 adoption, independent of any application-level code change. - H4: Community backlash to this cycle's ~20 deprecations will be measurably lower than PHP 7→8-era deprecation backlash, correlating with Rector/Mago adoption rates. - H5: `clamp()` adoption will reduce the number of duplicate userland clamp implementations across the top PHP frameworks within 12 months of GA. ### 📊 Methodology - Static-analysis diff (e.g., via Rector custom rules) on public GitHub PHP repos, comparing wrapper-closure and userland-clamp density before/after an 8.6 upgrade commit. - Framework-maintainer survey (Amp, ReactPHP, Laravel, Symfony) on property-hook and PFA adoption timelines. - Longitudinal CVE/security-advisory tracking for PHP session-related vulnerabilities, segmented by PHP version. - Sentiment analysis of PHP RFC threads and social discussion (r/PHP, PHP Slack/Discord) comparing this cycle's deprecation reception to PHP 8.0/8.1 cycles. ### ❓ Questions - How much of the pipe operator's real-world friction does PFA actually remove once frameworks build idiomatic patterns around it, versus how much is addressed by other language features? - Will `SameSite=Lax` becoming the default break any common cross-site embed/redirect patterns still in production use? - Does the "tooling has solved deprecation pain" claim hold for smaller, unmaintained plugins that never adopted Rector/Mago in the first place? ### 🔮 Future Research - Real-world adoption telemetry for PFA once 8.6 ships (Packagist composer.json `require` version bumps as a proxy). - Hosting-provider rollout timing for PHP 8.6 defaults, and how quickly the new session settings propagate to shared hosting. - IDE/static-analysis tooling support for function-parameter doc comments — adoption may hinge entirely on tooling catching up. ### 💡 Implications - **Practice:** PFA plus the pipe operator is a genuine ergonomics shift for functional-style PHP; expect style-guide and linter-rule updates in frameworks that lean functional. - **Security:** secure-by-default session settings reduce the "forgot to harden session config" class of misconfiguration, shifting risk toward legacy apps that explicitly override the new defaults. - **Education:** existing PHP fundamentals content teaching the pipe operator is now incomplete without PFA; training material needs a refresh once 8.6 is broadly available. - **Policy/funding:** not directly implicated by this source. ### 🧠 Learning Styles Assessment - Reading level estimate: Flesch-Kincaid Grade Level ≈ 8–9 (approximate, based on the conversational sentence structure and largely non-technical vocabulary of the spoken transcript — not run through a scoring tool). #### 👀 Visual learners - Present: none — audio-only narration transcript, no diagrams, code, or on-screen text described. - Improve: add code snippets for PFA/`clamp()` syntax and a before/after diagram of pipe-operator usage. #### 🔊 Aural learners - Present: this *is* a narrated video — well served by default. - Improve: none needed; format already matches this learning style. #### 🗣️ Verbal learners - Present: plain-language definitions for PFA, property hooks, and `clamp()` are given inline. - Improve: a short glossary of PHP-specific terms (RFC, readonly, property hook) for newer developers. #### 🧩 Kinesthetic learners - Present: none — no hands-on exercise or sandbox referenced. - Improve: link to a runnable PHP 8.6 RC sandbox (e.g., 3v4l.org or Playground) so viewers can try PFA/`clamp()` directly. #### 🧠 Logical learners - Present: causal chain from property hooks (8.4) to readonly defaults (8.6) is explained. - Improve: a version-dependency timeline diagram (8.0→8.6) would make cross-release causality clearer. #### 🧑‍🤝‍🧑 Social learners - Present: presenter invites comments ("let me know what you're looking forward to"). - Improve: link to the actual RFC discussion threads for readers who want to follow community debate. #### 🧘‍♀️ Solitary learners - Present: content is consumable solo with no required interaction. - Improve: add a self-check ("could you rewrite this closure using PFA?") prompt. #### 🌿 Naturalistic learners - Present: not applicable — no ecosystem/sustainability framing in this source. - Improve: not applicable. ### 📊 Accessibility Assessment #### Screen reader semantics - Present: not assessable from a transcript alone (no page/DOM to evaluate). - Improve: N/A to this source type. #### Keyboard navigation - Not applicable — video content, not an interactive interface. #### Contrast and readability - Not applicable — no on-screen text/graphics described in the source transcript. #### Text resizing and reflow - Not applicable. #### Media and captions - Present: transcript exists (this document's source), implying captions/subtitles are available on the platform. - Improve: verify auto-captions are accurate for technical terms (PFA, `clamp()`) which ASR commonly mangles — this transcript itself shows a likely mis-transcription of "SameSite=Lax" as "same site is set to less." #### Forms and interactions - Not applicable. #### Standards reference - Insufficient source material (transcript only, no page markup) to map to specific WCAG 2.2 AA success criteria beyond the captions note above (1.2.2 Captions). ### 🌍 DEIB Assessment #### Cultural breadth - Present: single presenter, single-language (English) content; no regional/multilingual examples. - Improve: not required for a technical release-notes format, but a translated companion post would broaden reach. #### Inclusive language - Present: technical, gender-neutral, no exclusionary language observed. - Improve: none needed. #### Neurodiversity support - Present: consistent topic-by-topic structure (PFA → readonly → polling → clamp → doc comments → sessions → deprecations) is predictable and easy to follow. - Improve: chapter markers/timestamps on the original video would help chunk consumption. #### Representation - Not applicable — single narrator, no represented identities/roles to assess. #### Psychological safety - Present: respectful, low-stakes framing even when discussing a contentious topic (deprecations); presenter explicitly invites disagreement in comments. - Improve: none needed. ### ✅ Logical Validity #### Strong reasoning - Causal reasoning: the readonly-property-defaults explanation correctly chains PHP 8.4's property hooks (interface-definable) to why 8.6 can now permit meaningful defaults — a sound, verifiable technical claim, not just an assertion. - Inductive framing: the argument for `clamp()` ("it came with all the major frameworks but never built into PHP") uses convergent independent implementations as evidence of genuine need — a reasonable inductive case for the feature's value. #### Fallacies - **Hasty generalization / unsupported prediction:** "I think partial function application will be a gamechanger" is asserted with only the pipe-operator argument as support, then immediately hedged ("time will have to tell") — the hedge is honest, but the headline claim outruns the evidence given. Fix: qualify the claim explicitly as a prediction rather than stating it before the hedge. - **Appeal to inevitability (mild):** deprecation opposition is framed as something that "shouldn't" happen given modern tooling, which sidesteps that tooling maturity doesn't address every real-world case (e.g., abandoned plugins). Fix: acknowledge the edge case explicitly rather than treating tooling as a complete solution. #### Tone of voice - Enthusiastic, informal, first-person opinion-forward ("I would call it," "I don't know how I feel about this one"), consistent with a YouTube dev-advocate explainer rather than formal release documentation. ### 🛡️ DARVO Analysis Not applicable to this source — a technical feature walkthrough with no interpersonal conflict, accusation, or defensive framing; DARVO's deny/attack/reverse-victim-offender pattern has no content to map to here. ## 🎯 Conclusion PHP 8.6 is shaping up as an ergonomics-and-security release rather than a paradigm shift: partial function application is the standout for finally making the pipe operator practical, readonly property defaults close a gap opened by 8.4's property hooks, and session handling gets more secure defaults out of the box. The polling API and ~20 deprecations are the parts most likely to be misunderstood or contested, respectively. Practical next step: revisit this note once the presenter's promised PFA deep-dive lands, and track the session-default and deprecation list against WordPress's PHP compatibility work as 8.6 approaches its November 2026 GA. ## 🔄 Refactor Appendix — PHP 8.6 First Look: What's Coming and What's Leaving ### 📚 Literature Atoms (H3) #### PFA lets you pre-fill a function's parameters > [!quote] ID:transcript_pfa > partial function application allows you to create a reference to a function with some of its parameters pre-filled. **Context & use**: - Presented early as the definition of PFA, immediately tied to the pipe operator's ergonomics problem. - Matters because it's the mechanism that eliminates wrapper-closure boilerplate — the concrete "why this feature" answer, not just a definition. **Tags**: #xref **Highlight**: transcript (no timestamp data in source) <!-- atomicity: 1 idea ✓ --> #### Property hooks unlock readonly property defaults > [!quote] ID:transcript_readonly > we can now set default values on readonly properties because of this and I think that's really good. **Context & use**: - "This" refers to property hooks (PHP 8.4) becoming interface-definable, letting a readonly property vary meaningfully by implementation. - Matters as a cross-version dependency: this feature is inert without understanding 8.4's property hooks first. **Tags**: #xref **Highlight**: transcript (no timestamp data in source) <!-- atomicity: 1 idea ✓ --> #### Sessions get secure-by-default settings > [!quote] ID:transcript_sessions > Session strict mode is enabled by default. Cookies are now marked as HTTP only by default and same site is set to less as well. **Context & use**: - Note: "same site is set to less" is a likely ASR mis-transcription of "SameSite=Lax" — flagged in the Accessibility section above, preserved verbatim per quote policy. - Matters for WordPress hosting compatibility — flagged in Action Items → Hosting. **Tags**: #xref **Highlight**: transcript (no timestamp data in source) <!-- atomicity: 1 idea ✓ --> ### 🧠 Permanent Candidates (H4) #### Partial function application removes the wrapper-closure tax on pipe-style PHP **Claim** (Courtney's voice): Partial function application makes a pipe-operator-style call chain viable without hand-written single-purpose wrapper closures. **Evidence pointer**: [[#H1]] (PFA lets you pre-fill a function's parameters) **Scope & conditions**: - Holds when: composing multi-step transformations where each step needs only 1–2 of a function's parameters fixed. - Breaks when: the function's remaining "open" parameter isn't the one the pipe operator expects to pass, forcing a closure anyway. **Links**: - [[Function composition]] — because extends (PFA is a language-level primitive in service of the same goal composition patterns solve in userland) - [[Pipe operator ergonomics]] — because applies-in the specific pain point this claim resolves <!-- atomicity: 1 idea ✓ --> ### ✏️ Fleeting Queue - [F1] Verify whether the ASR error "same site is set to less" (likely `SameSite=Lax`) is corrected in the video's official captions — https://www.youtube.com/watch?v=vmSiuI2tVQ4 #xref - [F2] Revisit once Brent Roose's dedicated PFA follow-up video ships — check stitcher.io for the post version — https://stitcher.io/blog/php-86-partial-function-application #xref ### → Things 3 - [ ] Watch Brent Roose's dedicated partial-function-application follow-up video when published — WordPress PHP-compatibility research #things - [ ] Check WP-CLI and core test suite status against PHP 8.6 RC once available — hosting/compatibility prep #things --- ## Full Transcript [00:00] partial function application, read only<br>[00:02] property defaults, a new clamp function,<br>[00:05] and also one or two um or 20<br>[00:09] deprecations. PHP 8.6 is coming in<br>[00:12] November. There's still quite some time<br>[00:14] before it's here, but we're nearing<br>[00:16] feature freeze, so we already know<br>[00:19] what's coming, um but also what's going.<br>[00:22] Let's take a look.<br>[00:31] First up is partial function<br>[00:33] application, PFA for short. Uh I would<br>[00:36] call it the missing feature that should<br>[00:39] have been added in PHP a year ago. Uh<br>[00:42] because it makes the pipe operator<br>[00:44] finally usable. In short, partial<br>[00:47] function application allows you to<br>[00:48] create a reference to a function with<br>[00:51] some of its parameters pre-filled. And<br>[00:53] it's especially useful combined with a<br>[00:55] pipe operator because that one always<br>[00:57] needs a closure with exactly one<br>[01:00] parameter. So instead of having to wrap<br>[01:02] a function with another function, you<br>[01:04] can now write much cleaner code. There's<br>[01:07] much more to tell about PFA. I'll be<br>[01:09] making a follow-up video in the coming<br>[01:11] weeks about it. So make sure to<br>[01:12] subscribe if you haven't yet to uh be<br>[01:15] kept in the loop about that one. Next<br>[01:17] are readonly property defaults. And you<br>[01:19] know it didn't make much sense to have<br>[01:21] default values for readonly properties<br>[01:23] before uh because that would essentially<br>[01:26] make them constants you know uh a<br>[01:27] hard-coded value that cannot change.<br>[01:30] However, uh PHP 84 introduced property<br>[01:32] hooks and made it so that they could be<br>[01:35] defined on interfaces and that kind of<br>[01:38] changed the situation because now a<br>[01:41] readonly property from within the<br>[01:42] context of an interface can have<br>[01:44] different values because there can be<br>[01:46] multiple implementations of that same<br>[01:49] interface. Long story short, we can now<br>[01:52] set default values on readonly<br>[01:54] properties because of this and I think<br>[01:56] that's really good. Next is the polling<br>[01:58] API, and I want you to not overhype it.<br>[02:01] You might think that PHP's new polling<br>[02:04] API allows you to write more or better<br>[02:06] async code, but in reality, it was<br>[02:09] mostly designed to be a replacement for<br>[02:12] something that was already possible. The<br>[02:13] polling API uh will likely be useful to<br>[02:16] lower level frameworks like AMP or React<br>[02:19] PHP. Um, and it may even lead to better<br>[02:22] performance in some cases, but nothing<br>[02:24] more than that. I've already made a<br>[02:27] dedicated video about the polling API.<br>[02:29] Uh so make sure to check that one out<br>[02:31] after this one. Uh I'll leave a link in<br>[02:33] the description. Then there's a new<br>[02:35] clamp function and it's one of these<br>[02:37] things that makes you wonder, wasn't<br>[02:39] this in PHP before? It actually came<br>[02:41] with all of the major frameworks um but<br>[02:43] never built into PHP. And so that's<br>[02:46] changed now. Now the clamp function<br>[02:48] ensures that a given value is within a<br>[02:51] given bound. And if not, the nearest<br>[02:53] edge value is returned. What's<br>[02:55] especially cool is that it doesn't just<br>[02:56] work with integers and floats, but also<br>[02:58] with strings and dates. Next is function<br>[03:02] parameter doc comments. Uh, I don't know<br>[03:05] how I feel about this one. It will<br>[03:07] probably take some time to get used to,<br>[03:09] but essentially it allows you to add doc<br>[03:11] comments to function parameters directly<br>[03:13] instead of adding one giant block on the<br>[03:16] function with add param tags. Again,<br>[03:19] it'll probably take some time to get<br>[03:20] used to. We'll see. Then there are some<br>[03:23] changes to sessions. More specifically,<br>[03:25] uh some in setting defaults have been<br>[03:28] changed uh to make them more secure.<br>[03:30] Session strict mode is enabled by<br>[03:31] default. Cookies are now marked as HTTP<br>[03:34] only by default and same site is set to<br>[03:36] less as well. I also leave a link in the<br>[03:39] description uh to my blog post where I<br>[03:42] have a bit more info about these changes<br>[03:45] um if you want to check them out. So<br>[03:46] finally, deprecations. Um, full<br>[03:50] disclosure, I like deprecations. Uh, I<br>[03:52] think they are a good way of evolving<br>[03:55] any language or library. You know, with<br>[03:57] modern PHP, I also feel it's pretty easy<br>[04:00] to to deal with them thanks to tools<br>[04:02] like Recctor and Mago that will<br>[04:04] basically upgrade your codebase for you.<br>[04:06] Despite all of that, uh, deprecations<br>[04:08] always tend to cause some backlash. Um,<br>[04:11] I don't think they should, but I I am<br>[04:14] expecting many developers to be vocally<br>[04:16] against them. I think especially in this<br>[04:18] day and age, it's so important to keep<br>[04:21] your software up to date and<br>[04:24] deprecations really shouldn't be a<br>[04:26] blocker to you. So, PHP 8.6 uh there are<br>[04:30] some small features and changes uh that<br>[04:32] you'll find in the blog as well. Um but<br>[04:35] these are definitely the most important<br>[04:36] ones. I think partial function<br>[04:38] application will be a gamecher. Um, time<br>[04:42] will have to tell, but you let me know<br>[04:44] what you're looking forward to the most<br>[04:46] uh in the comments and also share your<br>[04:48] thoughts about deprecations. And while<br>[04:50] you're writing your comments down there,<br>[04:52] also leave a like and don't forget to<br>[04:54] subscribe. And then I'll see you in the<br>[04:56] next one. Bye-bye. <!-- deep-read:sections end --> ## Highlights - partial function application allows you to create a reference to a function with some of its parameters pre-filled. - Note: 📚 PFA lets you pre-fill a function's parameters · - Presented early as the definition of PFA, immediately tied to the pipe operator's ergonomics problem. - Matters because it's the mechanism that eliminates wrapper-closure boilerplate — the concrete "why this feature" answer, not just a definition. · #atom/literature/h1 - we can now set default values on readonly properties because of this and I think that's really good. - Note: 📚 Property hooks unlock readonly property defaults · - "This" refers to property hooks (PHP 8.4) becoming interface-definable, letting a readonly property vary meaningfully by implementation. - Matters as a cross-version dependency: this feature is inert without understanding 8.4's property hooks first. · #atom/literature/h2 - Session strict mode is enabled by default. Cookies are now marked as HTTP only by default and same site is set to less as well. - Note: 📚 Sessions get secure-by-default settings · - Note: "same site is set to less" is a likely ASR mis-transcription of "SameSite=Lax" — flagged in the Accessibility section above, preserved verbatim per quote policy. - Matters for WordPress hosting compatibility — flagged in Action Items → Hosting. · #atom/literature/h3 - Partial function application removes the wrapper-closure tax on pipe-style PHP - Note: Holds when: composing multi-step transformations where each step needs only 1–2 of a function's parameters fixed. · - [[Function composition]] — because extends (PFA is a language-level primitive in service of the same goal composition patterns solve in userland) · #atom/zettel/z1 - Verify whether the ASR error "same site is set to less" (likely `SameSite=Lax`) is corrected in the video's official captions — https://www.youtube.com/watch?v=vmSiuI2tVQ4 #xref - Note: ✏️ Fleeting capture #atom/fleeting/f1 - Revisit once Brent Roose's dedicated PFA follow-up video ships — check stitcher.io for the post version — https://stitcher.io/blog/php-86-partial-function-application #xref - Note: ✏️ Fleeting capture #atom/fleeting/f2 - ** "I think partial function application will be a gamechanger" is asserted with only the pipe-operator argument as support, then immediately hedged ("time will have to tell") — the hedge is honest, but the headline claim outruns the evidence given. Fix: qualify the claim explicitly as a prediction rather than stating it before the hedge. - Note: 🔍 Fallacy: Hasty Generalization #fallacy/hasty-generalization