Skip to content

Instantly share code, notes, and snippets.

@bwoebi
Created September 12, 2013 12:54
Show Gist options
  • Save bwoebi/6536824 to your computer and use it in GitHub Desktop.
Save bwoebi/6536824 to your computer and use it in GitHub Desktop.
A little benchmarking script for https://github.com/php/php-src/pull/438
<?php
$code = <<<'CODE'
function abc(array $arr) {}
function def(callable $arr) {}
ClassNameWithMoreThan10Chars::class;
class ghi {
use jkl { mno as protected; }
}
CODE;
$start = microtime(1);
for ($i = 0; $i < 10000; $i++)
runkit_lint($code);
print "Took for $i iterations: ".(microtime(1) - $start)." seconds\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment