Created
December 25, 2015 04:18
-
-
Save rbayliss/95e7e22f699809702e38 to your computer and use it in GitHub Desktop.
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 | |
require_once __DIR__.'/vendor/autoload.php'; | |
$time = microtime(TRUE); | |
for($i = 0; $i < 1000; $i++) { | |
\League\Uri\Schemes\Http::createFromString('http://google.com'); | |
} | |
$base = \League\Uri\Schemes\Http::createFromString('http://google.com'); | |
$uri = \League\Uri\Schemes\Http::createFromString('/foo?bar#baz'); | |
$resolve = new \League\Uri\Modifiers\Resolve($base); | |
for($i = 0; $i < 1000; $i++) { | |
$resolve($uri); | |
} | |
$duration = microtime(TRUE) - $time; | |
print sprintf('Finished in %dms', round($duration * 1000)) . PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment