Skip to content
github-actions edited this page Mar 26, 2026 · 1 revision

Executes a callback within a deferred scope, ensuring all registered callbacks are executed at the end.

This function MUST create a Defer instance, pass it to the callback, and unset it after execution.


  • Full name: scope
  • Defined in: src/functions.php

Parameters

Parameter Type Description
$callback callable a function that receives the Defer and executes the desired logic

Return Value

mixed

the return value of the callback

Clone this wiki locally