mirror of
https://github.com/php/php-src.git
synced 2025-01-18 17:54:05 +08:00
18 lines
305 B
PHP
18 lines
305 B
PHP
--TEST--
|
|
$this re-assign
|
|
--FILE--
|
|
<?php
|
|
function foo() {
|
|
$a = "this";
|
|
$$a = 0;
|
|
var_dump($$a);
|
|
}
|
|
foo();
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot re-assign $this in %sthis_reassign.php:4
|
|
Stack trace:
|
|
#0 %sthis_reassign.php(7): foo()
|
|
#1 {main}
|
|
thrown in %sthis_reassign.php on line 4
|