Created
July 6, 2015 15:55
-
-
Save anonymous/1fc1f4519eeed1efbdb7 to your computer and use it in GitHub Desktop.
s9e\TextFormatter test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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