(Uwe Schindler)
- Fixed bug #32429 (method_exists() always return TRUE if __call method
exists). (Dmitry)
+- Fixed bug #32427 (Interfaces are not allowed 'static' access modifier).
+ (Dmitry)
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
(Moriyoshi)
- Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
--- /dev/null
+--TEST--
+Bug #32427 Interfaces are not allowed 'static' access modifier
+--FILE--
+<?php
+
+interface Example {
+ public static function sillyError();
+}
+
+class ExampleImpl implements Example {
+ public static function sillyError() {
+ echo "I am a silly error\n";
+ }
+}
+
+ExampleImpl::sillyError();
+?>
+--EXPECT--
+I am a silly error
if (is_method) {
if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) {
- if (!(fn_flags_znode->u.constant.value.lval == ZEND_ACC_PUBLIC)) {
+ if ((fn_flags_znode->u.constant.value.lval & ~(ZEND_ACC_STATIC|ZEND_ACC_PUBLIC))) {
zend_error(E_COMPILE_ERROR, "Access type for interface method %s::%s() must be omitted", CG(active_class_entry)->name, function_name->u.constant.value.str.val);
}
fn_flags_znode->u.constant.value.lval |= ZEND_ACC_ABSTRACT; /* propagates to the rest of the parser */