1--TEST-- 2Bug #76850 Exit code mangled by set locale/preg_match 3--SKIPIF-- 4<?php 5 $l = setlocale(LC_CTYPE, 0); 6 if ("C" == $l) { 7 die("skip need the current locale to be other than C"); 8 } 9?> 10--FILE-- 11<?php 12 13function foo() 14{ 15 $oldlocale = setlocale(LC_CTYPE, 0); 16 setlocale(LC_CTYPE, $oldlocale); 17} 18 19foo(); 20 21var_dump(preg_match('/./', "a")); 22 23?> 24--EXPECT-- 25int(1) 26