Merge "Add Special:Login and Special:Logout as aliases."
[lhc/web/wiklou.git] / includes / normal / RandomTest.php
index f2ec460..0602986 100644 (file)
  * @ingroup UtfNormal
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
 /** */
-require_once( 'UtfNormal.php' );
-require_once( '../diff/DifferenceEngine.php' );
+require_once 'UtfNormal.php';
+require_once '../diff/DifferenceEngine.php';
 
-dl('php_utfnormal.so' );
+dl( 'php_utfnormal.so' );
 
 # mt_srand( 99999 );
 
@@ -54,11 +54,7 @@ function donorm( $str ) {
 
        # UnicodeString constructor fails if the string ends with a head byte.
        # Add a junk char at the end, we'll strip it off
-       return rtrim( utf8_normalize( $str . "\x01", UNORM_NFC ), "\x01" );
-}
-
-function wfMsg($x) {
-       return $x;
+       return rtrim( utf8_normalize( $str . "\x01", UtfNormal::UNORM_NFC ), "\x01" );
 }
 
 function showDiffs( $a, $b ) {