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
#!/usr/bin/php | |
<?php | |
if (empty($argv[1]) || preg_match('#help#', $argv[1])) { | |
echo <<<END | |
Magically rename php4 style constructors to php5 style and add a deprecated stub for BC. | |
Recommended usage: | |
time git grep -lP '^\s*((abstract|final)\s+)*class [\w\d]+(\s*\{.*|\s*|\s+extends.*)$' -- '*.php' | sort -R | xargs -rn200 -P8 replace_deprecated_constructors.php |
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 | |
define('CLI_SCRIPT', true); | |
require_once __DIR__.'/config.php'; | |
$t = microtime(true); | |
$size = 0; | |
for ($i = 1; $i <= 1000; $i++) { | |
$user = $DB->get_record_sql("SELECT * FROM {user} WHERE id = :id", array('id' => $i)); |
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 | |
# This test demonstrates a problem with HHVM not seeing when included files have been updated. | |
# hhvm#1595 | |
# Expected output: | |
# $ php test.php | |
# $included has value: [a] | |
# $included has value: [b] |