summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug73392.phpt
blob: 7546f5d99fb8d7118d4b5bdf2cd57dfdb630d1e5 (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 #73392 (A use-after-free in zend allocator management)
--FILE--
<?php
class Rep {
    public function __invoke() {
        return "d";
    }
}
class Foo {
    public static function rep($rep) {
        return "ok";
    }
}
function b() {
    return "b";
}
var_dump(preg_replace_callback_array(
    array(
        "/a/" => 'b',	"/b/" => function () { return "c"; }, "/c/" => new Rep, "reporting" => array("Foo", "rep"),  "a1" => array("Foo", "rep"),
    ), 'a'));
?>
--EXPECTF--
Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
NULL