Skip to content

Instantly share code, notes, and snippets.

Created July 6, 2015 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1fc1f4519eeed1efbdb7 to your computer and use it in GitHub Desktop.
Save anonymous/1fc1f4519eeed1efbdb7 to your computer and use it in GitHub Desktop.
s9e\TextFormatter test
<?php
include '/s9e/TextFormatter/src/autoloader.php';
use s9e\TextFormatter\Bundles\Fatdown as TextFormatter;
$filepath = '/tmp/post.txt';
$text = file_get_contents($filepath);
echo PHP_VERSION, "\t", $filepath, "\n";
$s=microtime(1);
$xml = TextFormatter::parse($text);
$e=microtime(1);
printf("%.6f\n",$e-$s);
$s=microtime(1);
$xml = TextFormatter::parse($text);
$e=microtime(1);
printf("%.6f\n",$e-$s);
$s=microtime(1);
$html = TextFormatter::render($xml);
$e=microtime(1);
printf("%.6f\n",$e-$s);
$s=microtime(1);
$html = TextFormatter::render($xml);
$e=microtime(1);
printf("%.6f\n",$e-$s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment