Changing URLs of mediawiki.org in scripts to the SSL-based website
[lhc/web/wiklou.git] / includes / normal / UtfNormalMemStress.php
index 7162a8b..9ae6f23 100644 (file)
@@ -5,7 +5,7 @@
  * to test regression on mem usage (bug 28146)
  *
  * Copyright © 2004-2011 Brion Vibber <brion@wikimedia.org>
- * http://www.mediawiki.org/
+ * https://www.mediawiki.org/
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * @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',