summaryrefslogtreecommitdiff
path: root/Zend/tests/catch_static.phpt
blob: 283aef9181edfe089fa9f66d69ff4b9056722188 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Cannot catch "static"
--FILE--
<?php

// This could in principle be supported, but isn't right now.
class Test {
    public function method() {
        try {
            foo();
        } catch (static $e) {}
    }
}

?>
--EXPECTF--
Fatal error: Bad class name in the catch statement in %s on line %d