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