PHP code example of sanmai / linter

1. Go to this page and download the library: Download sanmai/linter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sanmai / linter example snippets


$linter = new \Linter\StringLinter(' return 1;');
$result = $linter->foundErrors();

var_dump($result);
// bool(false)

$linter = new \Linter\StringLinter(' obviously invalid PHP code;');
$result = $linter->foundErrors();

var_dump($result);
// bool(true)