summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug76850.phpt
blob: acceb2da7185b06b7caad440b9af53848c005f02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #76850 Exit code mangled by set locale/preg_match
--SKIPIF--
<?php
    $l = setlocale(LC_CTYPE, 0);
    if ("C" == $l) {
        die("skip need the current locale to be other than C");
    }
?>
--FILE--
<?php

function foo()
{
        $oldlocale = setlocale(LC_CTYPE, 0);
        setlocale(LC_CTYPE, $oldlocale);
}

foo();

var_dump(preg_match('/./', "a"));

?>
--EXPECT--
int(1)