????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 52.15.165.239 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/mbstring/tests/ |
Upload File : |
--TEST-- Test mb_strtoupper() function : usage varitations - pass mixed ASCII and non-ASCII strings --SKIPIF-- <?php extension_loaded('mbstring') or die('skip'); function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build"); ?> --FILE-- <?php /* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding] * Description: Returns a uppercased version of $sourcestring * Source code: ext/mbstring/mbstring.c */ /* * Pass a Japanese string and a mixed Japanese and ASCII string to mb_strtolower * to check correct conversion is occurring (Japanese characters should not be converted). */ echo "*** Testing mb_strtoupper() : usage variations ***\n"; $string_mixed_upper = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCUEhQLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg=='); $string_mixed_lower = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCcGhwLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg=='); $string_all_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC'); echo "\n-- Mixed string (mulitbyte and ASCII characters) --\n"; $a = mb_strtoupper($string_mixed_lower, 'UTF-8'); var_dump(base64_encode($a)); if ($a == $string_mixed_upper) { echo "Correctly Converted\n"; } else { echo "Incorrectly Converted\n"; } echo "\n-- Multibyte Only String--\n"; $b = mb_strtoupper($string_all_mb, 'UTF-8'); var_dump(base64_encode($b)); if ($b == $string_all_mb) { // Japanese characters only - should not be any conversion echo "Correctly Converted\n"; } else { echo "Incorrectly Converted\n"; } echo "Done"; ?> --EXPECTF-- *** Testing mb_strtoupper() : usage variations *** -- Mixed string (mulitbyte and ASCII characters) -- string(80) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCUEhQLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg==" Correctly Converted -- Multibyte Only String-- string(40) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC" Correctly Converted Done