PHPackages                             phpcat/phpcat - 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. phpcat/phpcat

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

phpcat/phpcat
=============

点评cat监护 php sdk

1.1(6y ago)016PHPPHP &gt;=5.3.9

Since Jun 10Pushed 6y agoCompare

[ Source](https://github.com/guoho/phpcat)[ Packagist](https://packagist.org/packages/phpcat/phpcat)[ RSS](/packages/phpcat-phpcat/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

cat监控phpsdk
===========

[](#cat监控phpsdk)

### About

[](#about)

[CAT](https://github.com/dianping/cat) was created by [Frankie Wu](https://github.com/qmwu2000) and [youyong205](https://github.com/youyong205) in [DaZhongDianPing](http://www.dianping.com) (大众点评). This copy is ***translated*** from the Java version for PHP project.

### Usage

[](#usage)

```
use Message\Message;

function __autoload($class)
{
    $path = str_replace("\\", "/", $class);
    require_once($path . '.php');
}

class ExceptionTest
{
    function methodThrowsException()
    {
        throw new Exception;
    }

    public function run()
    {
        try {
            $a = $this->methodThrowsException();
            echo $a;
            echo "hello, world!!!\n";
        } catch (Exception $e) {
            Cat::logError('Error', get_class($e), $e);
        }
    }
}

$test = new ExceptionTest();
$test->run();

class TransactionTest
{
    public function run()
    {
        $transaction = Cat::newTransaction("URL", "/hello/world");

        {
            $t1 = Cat::newTransaction('Invoke', 'method1()');
            sleep(2);
            $t1->setStatus(Message::SUCCESS);
            $t1->addData("Hello", "world");
            $t1->complete();
        }

        {
            $t2 = Cat::newTransaction('Invoke', 'method2()');
            sleep(2);
            $t2->setStatus(Message::SUCCESS);
            $t2->complete();
        }

        {
            $t3 = Cat::newTransaction('Invoke', 'method3()');
            sleep(1);
            {
                $t4 = Cat::newTransaction('Invoke', 'method4()');
                sleep(2);
                $t4->setStatus(Message::SUCCESS);
                $t4->complete();
            }

            $t3->setStatus(Message::SUCCESS);
            $t3->complete();
        }

        $transaction->setStatus(Message::SUCCESS);
        $transaction->addData("Hello, world!");
        $transaction->complete();
    }
}

$test = new TransactionTest();
$test->run();

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

2531d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fd7f415e756349e1fcfab5fe4a8159b0e9e151120107e37d6f3ca3202e0f193?d=identicon)[guoho](/maintainers/guoho)

---

Tags

catphpcat

### Embed Badge

![Health badge](/badges/phpcat-phpcat/health.svg)

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

###  Alternatives

[whatthejeff/nyancat-scoreboard

Nyan Cat Scoreboard

19985.0k4](/packages/whatthejeff-nyancat-scoreboard)[helthe/turbolinks

Helthe Turbolinks Component

112122.5k4](/packages/helthe-turbolinks)

PHPackages © 2026

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