From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/normal/UtfNormalBench.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes/normal/UtfNormalBench.php') diff --git a/includes/normal/UtfNormalBench.php b/includes/normal/UtfNormalBench.php index 944c4435..89de9290 100644 --- a/includes/normal/UtfNormalBench.php +++ b/includes/normal/UtfNormalBench.php @@ -19,11 +19,15 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html - * + * * @file * @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' ); } @@ -34,10 +38,6 @@ require_once 'UtfNormal.php'; define( 'BENCH_CYCLES', 5 ); -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', @@ -80,7 +80,7 @@ function benchmarkTest( &$u, $filename, $desc ) { } } -function benchTime(){ +function benchTime() { $st = explode( ' ', microtime() ); return (float)$st[0] + (float)$st[1]; } -- cgit v1.2.3-54-g00ecf