summaryrefslogtreecommitdiff
path: root/Zend/tests/call_to_abstract_method_args.phpt
blob: cbbc276d2ce2381662209cb557b3c1a9422990bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Check that arguments are freed when a call to an abstract method throws
--FILE--
<?php

abstract class Test {
    abstract static function method();
}

try {
    Test::method(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

$ret = new stdClass;
try {
    $ret = Test::method(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Cannot call abstract method Test::method()
Cannot call abstract method Test::method()