summaryrefslogtreecommitdiff
path: root/Zend/tests/this_in_extract.phpt
blob: de8da3d0a5acb3333729ad95f44563e981a21ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
$this re-assign in extract()
--FILE--
<?php
function foo() {
	extract(["this"=>42]);
	var_dump($this);
}
foo();
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot re-assign $this in %sthis_in_extract.php:3
Stack trace:
#0 %sthis_in_extract.php(3): extract(Array)
#1 %sthis_in_extract.php(6): foo()
#2 {main}
  thrown in %sthis_in_extract.php on line 3