summaryrefslogtreecommitdiff
path: root/Zend/tests/indirect_method_call_001.phpt
blob: 39967fdb267d46944042b3d89421f675dcb832bf (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"