xref: /PHP-8.0/ext/pcre/tests/bug73392.phpt (revision d81ea5e9)
1--TEST--
2Bug #73392 (A use-after-free in zend allocator management)
3--FILE--
4<?php
5class Rep {
6    public function __invoke() {
7        return "d";
8    }
9}
10class Foo {
11    public static function rep($rep) {
12        return "ok";
13    }
14}
15function b() {
16    return "b";
17}
18var_dump(preg_replace_callback_array(
19    array(
20        "/a/" => 'b',	"/b/" => function () { return "c"; }, "/c/" => new Rep, "reporting" => array("Foo", "rep"),  "a1" => array("Foo", "rep"),
21    ), 'a'));
22?>
23--EXPECTF--
24Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
25NULL
26