Exakat\Phpexec::compile PHP Method

compile() public method

public compile ( $file )
    public function compile($file)
    {
        $shell = shell_exec($this->phpexec . ' -l ' . escapeshellarg($file) . ' 2>&1');
        $shell = preg_replace('/(PHP Warning|Warning|Strict Standards|PHP Warning|PHP Strict Standards|PHP Deprecated|Deprecated): .*?\\n/i', '', $shell);
        $shell = trim($shell);
        return trim($shell) == 'No syntax errors detected in ' . $file;
    }