summaryrefslogtreecommitdiff
path: root/Zend/tests/indirect_method_call_001.phpt
blob: 7018eaa740293086f6fb0dbc0fb69b3a7b7ebeed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Testing indirect method call and exceptions
--FILE--
<?php

class foo {
	public function __construct() {
		throw new Exception('foobar');
	}
}

try {
	$X = (new foo)->Inexistent(3);
} catch (Exception $e) {
	var_dump($e->getMessage()); // foobar
}

?>
--EXPECT--
string(6) "foobar"