source: src/router/php7/Zend/tests/this_in_catch.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 270 bytes
Line 
1--TEST--
2$this in catch
3--FILE--
4<?php
5class C {
6        function foo() {
7                try {
8                        throw new Exception();
9                } catch (Exception $this) {
10                }
11                var_dump($this);
12        }
13}
14$obj = new C;
15$obj->foo();
16?>
17--EXPECTF--
18Fatal error: Cannot re-assign $this in %sthis_in_catch.php on line 6
Note: See TracBrowser for help on using the repository browser.