diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/normal/UtfNormalMemStress.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/normal/UtfNormalMemStress.php')
-rw-r--r-- | includes/normal/UtfNormalMemStress.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/normal/UtfNormalMemStress.php b/includes/normal/UtfNormalMemStress.php index 1277dc20..9732d762 100644 --- a/includes/normal/UtfNormalMemStress.php +++ b/includes/normal/UtfNormalMemStress.php @@ -26,6 +26,10 @@ * @ingroup UtfNormal */ +if( PHP_SAPI != 'cli' ) { + die( "Run me from the command line please.\n" ); +} + if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) { dl( 'php_utfnormal.so' ); } @@ -38,10 +42,6 @@ define( 'BENCH_CYCLES', 1 ); define( 'BIGSIZE', 1024 * 1024 * 10); // 10m ini_set('memory_limit', BIGSIZE + 120 * 1024 * 1024); -if( php_sapi_name() != 'cli' ) { - die( "Run me from the command line please.\n" ); -} - $testfiles = array( 'testdata/washington.txt' => 'English text', 'testdata/berlin.txt' => 'German text', @@ -82,7 +82,7 @@ function benchmarkTest( &$u, $filename, $desc ) { } } -function benchTime(){ +function benchTime() { $st = explode( ' ', microtime() ); return (float)$st[0] + (float)$st[1]; } |