PHP code example of aerialship / lex
1. Go to this page and download the library: Download aerialship/lex 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/ */
aerialship / lex example snippets
php
$lexer->tokenizeAsync(' 2131 + 33 / 567', function(Token $token) {
print "{$token->getToken()}({$token->getValue()})\n";
});
php
$result = $lexer->tokenize(' 2131 + 33 / 567');
print_r($result);