1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/Zend/tests/errmsg/errmsg_018.phpt
DanielEScherzer 0b94cf65e4 GH-16067: prevent invalid abstract during compilation of methods (GH-16069)
For classes that are not declared `abstract`, produce a compiler error for any
`abstract` methods. For anonymous classes, since they cannot be made abstract,
the error message is slightly different.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-10-23 15:04:18 +02:00

14 lines
253 B
PHP

--TEST--
errmsg: static abstract function
--FILE--
<?php
class test {
static abstract function foo ();
}
echo "Done\n";
?>
--EXPECTF--
Fatal error: Class test declares abstract method foo() and must therefore be declared abstract in %s on line %d