1. Go to this page and download the library: Download slexx/comparisons-lang 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/ */
slexx / comparisons-lang example snippets
lexx\CL\CL;
use Slexx\CL\Tokenizer;
$parser = new CL('>=18&<40', Tokenizer::T_INT);
var_dump($parser->compileToPHP('$age')); // "$age >= 18 && $age < 40"
var_dump($parser->compileToSQL('users', 'age')); // "`users`.`age` >= 18 AND `users`.`age` < 40"