The messages of the steps that threw, in step order. Never throws. */ public static function attempt(callable ...$steps): array { $failures = []; foreach ($steps as $step) { try { $step(); } catch (Throwable $e) { $failures[] = $e->getMessage(); } } return $failures; } }