summaryrefslogtreecommitdiff
path: root/Zend/tests/this_reassign.phpt
blob: 5a9109fd8cf4da640dc73ef0596afa6d101b784c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--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