Closure To Call¶
<?php
function foo($a, $b) { return $a + $b; }
foo(1,2);
foo(...)(1,2);
foo(...)(...)(1,2);
The ... operator can be used to create a closure from a method. That closure can be called immediately, or used to create yet another closure. That processed is not guarded, so the (...) operator can be called multiple times, without any effect.
See Also¶
PHP Features¶
Last updated: 14 July 2026