Exemple #1
0
function testLexingPerformance(Lexer $lexer, $string)
{
    $startTime = microtime(true);
    $lexer->lex($string);
    $endTime = microtime(true);
    echo 'Took ', $endTime - $startTime, ' seconds (', get_class($lexer), ')', "\n";
}