summaryrefslogtreecommitdiff
path: root/Zend/tests/this_in_extract.phpt
blob: 2e3f7b497fdbf5b57541e8b144582171db4ad6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
$this re-assign in extract()
--FILE--
<?php
function foo() {
    try {
        extract(["this"=>42, "a"=>24]);
    } catch (Error $e) {
        echo $e->getMessage(), "\n";
    }
    var_dump($a);
}
foo();
?>
--EXPECTF--
Cannot re-assign $this

Warning: Undefined variable $a in %s on line %d
NULL