Created
January 13, 2015 20:51
-
-
Save ciaranmcnulty/7706c36bbc62ee858317 to your computer and use it in GitHub Desktop.
Quick survey of extensions
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 | |
$extensions = file_get_contents('https://raw.githubusercontent.com/phpspec/phpspec/master/docs/cookbook/extensions.rst'); | |
$tmp = tempnam(sys_get_temp_dir(), 'extension-checker'); | |
unlink($tmp); mkdir($tmp); chdir($tmp); | |
if (preg_match_all('/[<](?<url>http.*)[>]/', $extensions, $matches)) { | |
foreach ($matches['url'] as $url) { | |
passthru('git clone ' . escapeshellarg($url)); | |
} | |
} | |
echo "ask:\n"; | |
passthru('grep -R "ask(" . | wc -l'); | |
echo "askAndValidate:\n"; | |
passthru('grep -R "askAndValidate(" . | wc -l'); | |
echo "askAndValidate:\n"; | |
passthru('grep -R "askConfirmation(" . | wc -l'); | |
exec('rm -rf '. escapeshellarg($tmp)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment