summaryrefslogtreecommitdiff
path: root/maintenance/benchmarks/bench_strtr_str_replace.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/benchmarks/bench_strtr_str_replace.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/benchmarks/bench_strtr_str_replace.php')
-rw-r--r--maintenance/benchmarks/bench_strtr_str_replace.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/maintenance/benchmarks/bench_strtr_str_replace.php b/maintenance/benchmarks/bench_strtr_str_replace.php
index bd21b186..44c8e032 100644
--- a/maintenance/benchmarks/bench_strtr_str_replace.php
+++ b/maintenance/benchmarks/bench_strtr_str_replace.php
@@ -38,8 +38,7 @@ function bfNormalizeTitleStrReplace( $str ) {
*
* @ingroup Benchmark
*/
-class bench_strtr_str_replace extends Benchmarker {
-
+class BenchStrtrStrReplace extends Benchmarker {
public function __construct() {
parent::__construct();
$this->mDescription = "Benchmark for strtr() vs str_replace().";
@@ -51,7 +50,7 @@ class bench_strtr_str_replace extends Benchmarker {
array( 'function' => array( $this, 'benchstr_replace' ) ),
array( 'function' => array( $this, 'benchstrtr_indirect' ) ),
array( 'function' => array( $this, 'benchstr_replace_indirect' ) ),
- ));
+ ) );
print $this->getFormattedResults();
}
@@ -60,10 +59,9 @@ class bench_strtr_str_replace extends Benchmarker {
}
function benchstr_replace() {
- str_replace( "_", " ", "[[MediaWiki:Some_random_test_page]]");
+ str_replace( "_", " ", "[[MediaWiki:Some_random_test_page]]" );
}
-
function benchstrtr_indirect() {
bfNormalizeTitleStrTr( "[[MediaWiki:Some_random_test_page]]" );
}
@@ -71,8 +69,7 @@ class bench_strtr_str_replace extends Benchmarker {
function benchstr_replace_indirect() {
bfNormalizeTitleStrReplace( "[[MediaWiki:Some_random_test_page]]" );
}
-
}
-$maintClass = 'bench_strtr_str_replace';
+$maintClass = 'BenchStrtrStrReplace';
require_once RUN_MAINTENANCE_IF_MAIN;