mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +08:00
17 lines
247 B
PHP
17 lines
247 B
PHP
--TEST--
|
|
Using $this when out of context
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
$this->a = 1;
|
|
} catch (Exception $e) {
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Using $this when not in object context in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|