Check php code syntax
PHP
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml

README.md

Check php code syntax

Build Status

Example:

<?php
use Syntax\Php;

$syntax = new Php();

$resultCheck = $syntax->check('<?php echo 1; ?>');
print_r($resultCheck);

$resultCheckFile = $syntax->checkFile('example.php');
print_r($resultCheckFile);

Requirements:

  • PHP >= 5.6

Installation:

composer require gemorroj/syntax