summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug77669.phpt
blob: 1e34f453a29d2cffc1b4c6f6303ceb32f6a8f24e (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
26
27
28
29
30
31
32
33
34
35
--TEST--
Bug #77669: Crash in extract() when overwriting extracted array
--FILE--
<?php

function test($mode) {
    $foo = [];
    $foo["foo"] = 42;
    $foo["bar"] = 24;
    extract($foo, $mode, "");
    $prefix_foo = [];
    $prefix_foo["foo"] = 42;
    $prefix_foo["bar"] = 24;
    extract($prefix_foo, $mode, "prefix");
}

test(EXTR_OVERWRITE);
test(EXTR_SKIP);
test(EXTR_IF_EXISTS);
test(EXTR_PREFIX_SAME);
test(EXTR_PREFIX_ALL);
test(EXTR_PREFIX_INVALID);
test(EXTR_PREFIX_IF_EXISTS);
test(EXTR_REFS | EXTR_OVERWRITE);
test(EXTR_REFS | EXTR_SKIP);
test(EXTR_REFS | EXTR_IF_EXISTS);
test(EXTR_REFS | EXTR_PREFIX_SAME);
test(EXTR_REFS | EXTR_PREFIX_ALL);
test(EXTR_REFS | EXTR_PREFIX_INVALID);
test(EXTR_REFS | EXTR_PREFIX_IF_EXISTS);

?>
===DONE===
--EXPECT--
===DONE===