Merge "It should not be possible for a RequestContext's WikiPage and Title to be...
[lhc/web/wiklou.git] / includes / normal / UtfNormalTest2.php
index fafd547..691bfaa 100644 (file)
@@ -1,7 +1,22 @@
 #!/usr/bin/php
 <?php
 /**
- * Other tests for the unicode normalization module
+ * Other tests for the unicode normalization module.
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * 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
@@ -61,6 +76,7 @@ function normalize_form_kd($c)     { return UtfNormal::toNFKD($c); }
  * following functions to force pure PHP usage.  I decided not to
  * commit that code since might produce a slowdown in the UTF
  * normalization code just for the sake of these tests. -- hexmode
+ * @return string
  */
 function normalize_form_c_php($c)  { return UtfNormal::toNFC($c, "php");  }
 function normalize_form_d_php($c)  { return UtfNormal::toNFD($c, "php");  }
@@ -194,12 +210,12 @@ echo "done.\n";
 function unichr($c) {
        if ($c <= 0x7F) {
                return chr($c);
-       } else if ($c <= 0x7FF) {
+       } elseif ($c <= 0x7FF) {
                return chr(0xC0 | $c >> 6) . chr(0x80 | $c & 0x3F);
-       } else if ($c <= 0xFFFF) {
+       } elseif ($c <= 0xFFFF) {
                return chr(0xE0 | $c >> 12) . chr(0x80 | $c >> 6 & 0x3F)
                        . chr(0x80 | $c & 0x3F);
-       } else if ($c <= 0x10FFFF) {
+       } elseif ($c <= 0x10FFFF) {
                return chr(0xF0 | $c >> 18) . chr(0x80 | $c >> 12 & 0x3F)
                        . chr(0x80 | $c >> 6 & 0x3F)
                        . chr(0x80 | $c & 0x3F);