diff --git a/parallel-lint b/parallel-lint index b6bb513..3a806d5 100755 --- a/parallel-lint +++ b/parallel-lint @@ -31,7 +31,15 @@ either expressed or implied, of the FreeBSD Project. */ if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) { - fwrite(STDERR, "PHP Parallel Lint requires PHP 5.3.0 or newer." . PHP_EOL); + fwrite( + STDERR, + sprintf( + 'PHP Parallel Lint requires PHP 5.3.0 or newer.' . PHP_EOL + . 'You are using PHP %s (%s).' . PHP_EOL, + PHP_VERSION, + PHP_BINDIR + ) + ); exit(254); } @@ -70,5 +78,7 @@ if (!$loaded) { require_once __DIR__ . '/src/polyfill.php'; -$app = new PHP_Parallel_Lint\PhpParallelLint\Application(); +// Prevent parse error on PHP < 5.3 so the version check above can work. +$className = 'PHP_Parallel_Lint\PhpParallelLint\Application'; +$app = new $className(); exit($app->run());