xref: /PHP-8.0/Zend/tests/catch_static.phpt (revision 5d869df7)
1--TEST--
2Cannot catch "static"
3--FILE--
4<?php
5
6// This could in principle be supported, but isn't right now.
7class Test {
8    public function method() {
9        try {
10            foo();
11        } catch (static $e) {}
12    }
13}
14
15?>
16--EXPECTF--
17Fatal error: Bad class name in the catch statement in %s on line %d
18