PHPackages                             3f/lint - 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. [CLI &amp; Console](/categories/cli)
4. /
5. 3f/lint

ActiveLibrary[CLI &amp; Console](/categories/cli)

3f/lint
=======

Lint is a wrapper to `PHP -l` command.

1.3.6(8y ago)541711Apache-2.0PHPPHP &gt;=5.4.0

Since Oct 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dedalozzo/lint)[ Packagist](https://packagist.org/packages/3f/lint)[ Docs](https://github.com/dedalozzo/lint)[ RSS](/packages/3f-lint/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (7)DependenciesVersions (11)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/f9aeee7eb1b951e7aa778f8e82497609be4b4acb59d9c39f6306800499b67133/68747470733a2f2f706f7365722e707567782e6f72672f33662f6c696e742f762f737461626c652e706e67)](https://packagist.org/packages/3f/lint)[![Latest Unstable Version](https://camo.githubusercontent.com/d54571292097d6b4053d87f6350adcafcac5b30519460e9ed5b49c1b1158dab1/68747470733a2f2f706f7365722e707567782e6f72672f33662f6c696e742f762f756e737461626c652e706e67)](https://packagist.org/packages/3f/lint)[![Build Status](https://camo.githubusercontent.com/279ac69dbd720c78f3c0a7952d18306e877cda33d85b5bda073aedc4bd1c1bd6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646564616c6f7a7a6f2f6c696e742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dedalozzo/lint/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f2fa0c8579dc8dde1a45e558b048c37955182a60857664d92b9b1044f22cd832/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646564616c6f7a7a6f2f6c696e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dedalozzo/lint/?branch=master)[![License](https://camo.githubusercontent.com/3cb76f4d95c0dfb54ac841613ed66c40183bb9fb8ef7c9348e4e492778d3ea28/68747470733a2f2f706f7365722e707567782e6f72672f33662f6c696e742f6c6963656e73652e737667)](https://packagist.org/packages/3f/lint)[![Total Downloads](https://camo.githubusercontent.com/924079efef66ff4dec6067f111f61576dbbd449f5666f3a1d10ea985d940888d/68747470733a2f2f706f7365722e707567782e6f72672f33662f6c696e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/3f/lint)

Lint
====

[](#lint)

Lint is a wrapper to `php -l` command.

Composer Installation
---------------------

[](#composer-installation)

To install Lint, you first need to install [Composer](http://getcomposer.org/), a Package Manager for PHP, following those few [steps](http://getcomposer.org/doc/00-intro.md#installation-nix):

```
curl -s https://getcomposer.org/installer | php
```

You can run this command to easily access composer from anywhere on your system:

```
sudo mv composer.phar /usr/local/bin/composer
```

Lint Installation
-----------------

[](#lint-installation)

Once you have installed Composer, it's easy install Lint.

1. Edit your `composer.json` file, adding Lint to the require section:

```
{
    "require": {
        "3f/lint": "dev-master"
    },
}
```

2. Run the following command in your project root dir:

```
composer update
```

Usage
-----

[](#usage)

Lint provides two static methods only: `checkSourceFile()` and `checkSourceCode()`:

```
Lint::checkSourceFile("foo.php");
```

Methods
-------

[](#methods)

### Lint::checkSourceFile()

[](#lintchecksourcefile)

```
public static function checkSourceFile(
    $fileName
)
```

Makes the syntax check of the specified file. If an error occurs, generates an exception.

**Parameters**

- fileName

    The file name you want check.

**Exceptions**

- RuntimeException

    In case of error it raises an exception.

### Lint::checkSourceCode()

[](#lintchecksourcecode)

```
public static function checkSourceCode(
    $str,
    $addTags = TRUE
)
```

Makes the syntax check of the given source code. If an error occurs, generates an exception.

**Parameters**

- str

    The source code.
- addTags

    Tells if you want add PHP tags to the source code, because PHP lint needs them or it will raise an exception.

**Exceptions**

- RuntimeException

    In case of error it raises an exception.

Documentation
-------------

[](#documentation)

The documentation can be generated using [Doxygen](http://doxygen.org). A `Doxyfile` is provided for your convenience.

Requirements
------------

[](#requirements)

- PHP 5.4.0 or above.

Authors
-------

[](#authors)

Filippo F. Fadda -  -

License
-------

[](#license)

Lint is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~313 days

Total

10

Last Release

3090d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/311248?v=4)[Filippo Fadda](/maintainers/dedalozzo)[@dedalozzo](https://github.com/dedalozzo)

---

Top Contributors

[![dedalozzo](https://avatars.githubusercontent.com/u/311248?v=4)](https://github.com/dedalozzo "dedalozzo (32 commits)")

---

Tags

clilintlinterphpwrapperlintsyntax checker

### Embed Badge

![Health badge](/badges/3f-lint/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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