PHPackages                             hostnet/dead-tool - 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. hostnet/dead-tool

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

hostnet/dead-tool
=================

Dead Code Identification Toolbox

1.3.2(6y ago)42.2k3MITPHPPHP &gt;=7.1CI failing

Since Oct 8Pushed 5y ago5 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (12)Used By (0)

Welcome to the Dead Code identification toolset, this toolset can be used together with the dead files plugin for Eclipse and the treemap visualization.

Configuration
-------------

[](#configuration)

Please add a config.yml file in the root directory with the following contents:

```
options:
  dsn: mysql:host=servernamehere;dbname=databasenamehere
  username: usernamehere
  password: passwordhere
```

You can also put this information in ~/.deadrc for user based configuration or in /etc/dead.conf for systemwide configuration.

Run make to build dead.phar. dead.phar can be installed by running make install. Then the systemwide command dead will be available.

You have to add a table includes to the database databasenamehere. These names are not required but then you have to configure them or pass them as a commandline parameter. If you want to monitor multiple applications, use the application name instead of include.

The create query is:

```
CREATE TABLE `includes` (
 `function` varchar(700) NOT NULL,
 `count` bigint(20) NOT NULL,
 `first_hit` timestamp NULL default NULL,
 `last_hit` timestamp NULL default NULL on update CURRENT_TIMESTAMP,
 `added_at` timestamp NULL default NULL,
 `deleted_at` timestamp NULL default NULL,
 `changed_at` timestamp NULL default NULL,
 PRIMARY KEY  (`function`)
)
```

To let PHP add data to the measuring a file has to be added to the server (note: this is server wide, do not polute your application with this file).

append.php (or your own name)

```
