# Partial Function Application Removes the Wrapper-Closure Tax on Pipe-Style PHP ## Claim Partial function application makes a pipe-operator-style call chain viable in PHP without hand-written single-purpose wrapper closures. <!-- atomicity: 1 idea ✓ --> ## Scope & conditions - Holds when composing multi-step transformations where each step needs only one or two of a function's parameters pre-filled before the pipe operator passes its single argument through. - Breaks when a function's remaining "open" parameter isn't the one the pipe operator expects to pass — a closure is still needed in that case. - Specific to PHP 8.6's language-level PFA syntax; the underlying pattern (partial application solving pipe ergonomics) is general to functional-style composition, but this claim is about the PHP mechanism specifically. ## Evidence PHP 8.6's partial function application lets a developer "create a reference to a function with some of its parameters pre-filled." The presenter frames this as the fix that finally makes the pipe operator — added in an earlier PHP release but requiring wrapper closures with exactly one parameter to be useful — practical to write without that boilerplate. ## Links - [[3. Resources/MOCs/WordPress Hosting Security Stack MOC]] — because applies-in; PHP language-version features feed directly into hosting-stack compatibility planning ahead of PHP 8.6's GA. - [[3. Resources/MOCs/WordPress Platform Design MOC]] — applies-in: Covers PHP language changes relevant to WordPress code, a loose fit. ## Tests / falsifiers - Write an equivalent multi-step transformation both with PFA and with manual wrapper closures; if the PFA version isn't measurably shorter or clearer, the "removes the tax" framing overstates the benefit. - Find a common pipe-chain pattern where the function's open parameter position forces a closure anyway even with PFA available — that would narrow the claim's practical scope. ## Maintenance - Last tended: 2026-08-16 - Next review: 2026-11-16 ## Source - [[3. Resources/Literature Notes/PHP 8.6 First Look - What's Coming and What's Leaving]] — reports the PFA feature and its stated relationship to the pipe operator's ergonomics problem.