1. Go to this page and download the library: Download subapp/sql 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/ */
$parser = $factory->getProcessor(); // as default
$parser->getLexer()->tokenize('select U.id, U.name, max(U.id) from users U where U.id > 100');
$ast = $parser->parse();
$converter = $factory->getConverter();
$array = $converter->toArray($ast);
$ast = $converter->toNode($array);
$converter->toSql($ast);
// > SELECT U.id, U.name, MAX(U.id) FROM users AS U WHERE U.id > 100