This library provides a simple means to run a lint (aka syntactical) check on php code from within a php application:
$linter = new TheSeer\Tools\PHPLint(); $x = $linter->lintFile(FILE);
if (!$x) { var_dump($x, $linter->getError());<?php }
$linter = new TheSeer\Tools\PHPLint(); $x = $linter->lintString('<?php dddd');
var_dump($x, $linter->getError());