PHPackages                             spiderling-php/attempt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. spiderling-php/attempt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spiderling-php/attempt
======================

Retry something until it works

0.2.0(10y ago)080BSD-3-ClausePHP

Since Sep 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/spiderling-php/attempt)[ Packagist](https://packagist.org/packages/spiderling-php/attempt)[ RSS](/packages/spiderling-php-attempt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Attempt
=======

[](#attempt)

[![Build Status](https://camo.githubusercontent.com/9fad8757e1fb77f3d73966f8a3fd940370b7a22ecea460a1766dfb59f8664870/68747470733a2f2f7472617669732d63692e6f72672f7370696465726c696e672d7068702f617474656d70742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/spiderling-php/attempt)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8404b6bf8cf489bc3e02c27c8523cc6209c52f0736b6201c20ccf401dccf8f87/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696465726c696e672d7068702f617474656d70742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/spiderling-php/attempt/)[![Code Coverage](https://camo.githubusercontent.com/ef9ffadd953f11b01caecdb41e1d1fa0f1b0722cbd96fa22ec385bce2212cc88/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696465726c696e672d7068702f617474656d70742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/spiderling-php/attempt/)[![Latest Stable Version](https://camo.githubusercontent.com/b7c8012b66ea472c44c6f48c18c485c021ad6ef6c2c5c326eafa2203463e1909/68747470733a2f2f706f7365722e707567782e6f72672f7370696465726c696e672d7068702f617474656d70742f762f737461626c652e706e67)](https://packagist.org/packages/spiderling-php/attempt)

Retry something until it works

Installation
------------

[](#installation)

Install via composer

```
composer require spiderling-php/attempt

```

Usage
-----

[](#usage)

```
$attempt = new Attempt(function () {
    return ... // Try to do something
});

// Configure timeout and frequency of tries
$attempt->setTimeout(3000);
$attempt->setStep(50);

// Check how many times it will try before timing out
echo $attempt->getTries();

return $attempt->execute();
```

License
-------

[](#license)

Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Total

2

Last Release

3768d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/506129?v=4)[Harry Dobrev](/maintainers/hkdobrev)[@hkdobrev](https://github.com/hkdobrev)

---

Top Contributors

[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (7 commits)")

### Embed Badge

![Health badge](/badges/spiderling-php-attempt/health.svg)

```
[![Health](https://phpackages.com/badges/spiderling-php-attempt/health.svg)](https://phpackages.com/packages/spiderling-php-attempt)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
