1--TEST-- 2Do not inherit LC_CTYPE from environment 3--SKIPIF-- 4<?php 5if (!setlocale(LC_CTYPE, "de_DE", "de-DE")) die("skip requires de_DE locale"); 6?> 7--ENV-- 8LC_CTYPE=de_DE 9--FILE-- 10<?php 11 12var_dump(setlocale(LC_CTYPE, "0")); 13var_dump(bin2hex(strtoupper("\xe4"))); 14var_dump(preg_match('/\w/', "\xe4")); 15var_dump(setlocale(LC_CTYPE, "de_DE", "de-DE") !== false); 16var_dump(bin2hex(strtoupper("\xe4"))); 17var_dump(preg_match('/\w/', "\xe4")); 18?> 19--EXPECTF-- 20string(%d) "C%r(\.UTF-8)?%r" 21string(2) "e4" 22int(0) 23bool(true) 24string(2) "c4" 25int(1) 26