0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-08 14:58:42 +00:00
htmlpurifier/benchmarks/ProfileDirectLex.php
Edward Z. Yang 94d2dbaa74 Fix broken benchmark code.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@739 48356398-32a2-884e-a903-53898d9a118a
2007-02-13 20:51:47 +00:00

19 lines
539 B
PHP

<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../library/');
require_once 'HTMLPurifier/ConfigSchema.php';
require_once 'HTMLPurifier/Config.php';
require_once 'HTMLPurifier/Lexer/DirectLex.php';
require_once 'HTMLPurifier/Context.php';
$input = file_get_contents('samples/Lexer/4.html');
$lexer = new HTMLPurifier_Lexer_DirectLex();
$config = HTMLPurifier_Config::createDefault();
$context = new HTMLPurifier_Context();
for ($i = 0; $i < 10; $i++) {
$tokens = $lexer->tokenizeHTML($input, $config, $context);
}
?>