xref: /php-src/Zend/tests/abstract_implicit.phpt (revision 0b94cf65)
1--TEST--
2Abstract methods not allowed in classes that are not abstract (GH-16067)
3--FILE--
4<?php
5
6// Still allowed via trait
7trait TraitWithAbstract {
8    abstract public function foo();
9}
10class TraitWorks {
11    use TraitWithAbstract;
12}
13
14class NotAbstract {
15    abstract public function bar();
16}
17?>
18--EXPECTF--
19Fatal error: Class NotAbstract declares abstract method bar() and must therefore be declared abstract in %s on line %d
20