blob: 7e4c4c3e2405b3162b6f14754e72cbaecc3ec9f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--TEST--
Exceptions on improper usage of $this
--FILE--
<?php
try {
$this->foo();
} catch (EngineException $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
$this->foo();
?>
--EXPECTF--
Exception: Using $this when not in object context in %sexception_016.php on line %d
Fatal error: Uncaught EngineException: Using $this when not in object context in %sexception_016.php:%d
Stack trace:
#0 {main}
thrown in %sexception_016.php on line %d
|