1--TEST--
2Test mb_strtolower() function : basic functionality
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7/*
8 * Test basic functionality of mb_strtolower
9 */
10
11echo "*** Testing mb_strtolower() : basic functionality***\n";
12
13$ascii_lower = 'abcdefghijklmnopqrstuvwxyz';
14$ascii_upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
15$greek_lower = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J');
16$greek_upper = base64_decode('zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p');
17
18echo "\n-- ASCII String --\n";
19$ascii = mb_strtolower($ascii_upper);
20var_dump($ascii);
21
22if($ascii == $ascii_lower) {
23    echo "Correctly converted\n";
24} else {
25    echo "Incorrectly converted\n";
26}
27
28echo "\n-- Multibyte String --\n";
29$mb = mb_strtolower($greek_upper, 'UTF-8');
30var_dump(base64_encode($mb));
31
32if ($mb == $greek_lower) {
33    echo "Correctly converted\n";
34} else {
35    echo "Incorrectly converted\n";
36}
37
38echo "Done";
39?>
40--EXPECT--
41*** Testing mb_strtolower() : basic functionality***
42
43-- ASCII String --
44string(26) "abcdefghijklmnopqrstuvwxyz"
45Correctly converted
46
47-- Multibyte String --
48string(64) "zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J"
49Correctly converted
50Done
51