This file contains hidden or 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 | |
$options = array( | |
'repo' => '/Users/predominant/Projects/cakephp/2.0/.git', | |
'titleOrder' => array( | |
'dev', 'alpha', 'beta', 'rc', | |
), | |
'regex' => '/(?<version>[\d\.]+)(?:-(?<title>[a-zA-Z]+)(?:(?<iteration>\d)?))?/', | |
'formats' => array( | |
'plaintext' => '| awk \'{print "Commit: ["$1"]\n"; $1=""; print "-"$0"\n"}\'', | |
'lighthouse' => '| awk \'{print "#### Commit: ["$1"](http://github.com/cakephp/cakephp/commit/"$1")\n"; $1=""; print $0"\n"}\'', |
This file contains hidden or 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
#!/opt/local/bin/php | |
<?php | |
// Get a git log | |
$log = trim(`git shortlog -s -n -e`); | |
$log = explode("\n", $log); | |
// Clean and make a new directory for images. | |
`rm -rf gource-gravatars`; | |
mkdir('gource-gravatars'); |
This file contains hidden or 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 | |
/** | |
* Configuration options | |
* | |
*/ | |
$iterations = 10000000; | |
info(); | |
/** | |
* Actual Benchmarks to run |
This file contains hidden or 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 | |
$string = uniqid(); | |
$start = microtime(true); | |
for ($i = 0; $i < 1000000; $i++) { | |
crc32($string); | |
} | |
$elapsed = microtime(true) - $start; | |
echo "crc32 => $elapsed\n"; |
This file contains hidden or 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 | |
class A { | |
private static $__value = 'Foo'; | |
public function getValue() { | |
return self::$__value; | |
} | |
} | |
class B { |
NewerOlder