summaryrefslogtreecommitdiff
path: root/Zend/tests/this_in_catch.phpt
blob: d167e047a01841eeabac51f7edb8dc91aa5494a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
$this in catch
--FILE--
<?php
class C {
    function foo() {
        try {
            throw new Exception();
        } catch (Exception $this) {
        }
        var_dump($this);
    }
}
$obj = new C;
$obj->foo();
?>
--EXPECTF--
Fatal error: Cannot re-assign $this in %sthis_in_catch.php on line 6