Merge "servers => serves"
[lhc/web/wiklou.git] / includes / normal / UtfNormalBench.php
index 6642844..89de929 100644 (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];
 }