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