<?
require 'text.class.php';
$text = new Text ('text.txt');
$start = microtime(true);
// Returns all words (array)
$get_all = $text->get_all ();
var_dump ($get_all);
echo '<br>'.(microtime(true)-$start).'<hr><br>';
$start = microtime(true);
// Returns elements from 0 to 100 (array)
$get_limit = $text->get_limit (0, 100);
var_dump ($get_limit);
echo '<br>'.(microtime(true)-$start).'<hr><br>';
$start = microtime(true);
// Returns elements frequency > 500 (array)
$get_count_limit = $text->get_count_limit (500);
var_dump ($get_count_limit);
echo '<br>'.(microtime(true)-$start);
// Example ¹4
?>
<meta name="keywords" content="<?=implode (', ',$text->get_limit (0, 20));?>" />
|