php-src/Zend/tests/this_in_extract.phpt
2020-03-31 13:02:32 +02:00

20 lines
307 B
PHP

--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