for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Scalp\Utils;
final class Delayed
{
private $functionOrCodeBlock;
private $args;
public function __construct(callable $functionOrCodeBlock, ...$args)
$this->functionOrCodeBlock = $functionOrCodeBlock;
$this->args = $args;
}
public function __invoke()
return ($this->functionOrCodeBlock)(...$this->args);