mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
RFC: https://wiki.php.net/rfc/fcc_in_const_expr Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
21 lines
382 B
PHP
21 lines
382 B
PHP
--TEST--
|
|
FCC in initializer errors for FCC on abstract method
|
|
--FILE--
|
|
<?php
|
|
|
|
abstract class Foo {
|
|
abstract public static function myMethod(string $foo);
|
|
}
|
|
|
|
const Closure = Foo::myMethod(...);
|
|
|
|
var_dump(Closure);
|
|
(Closure)("abc");
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot call abstract method Foo::myMethod() in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|