summaryrefslogtreecommitdiff
path: root/Zend/tests/interface_extends_static.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-13 11:34:04 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-13 11:51:09 +0100
commit5d869df75329530a28860a3c2399ab32414fe5bc (patch)
treedaad3602d02cfe19d5579c10ef652e670d584aa2 /Zend/tests/interface_extends_static.phpt
parent2a3e37a496216488e273cdc46b46c454b0017baa (diff)
downloadphp-git-5d869df75329530a28860a3c2399ab32414fe5bc.tar.gz
Make class name references use the class_name production
Throw a compile error for "static" references instead, where it isn't already the case. Also extract the code that does that -- we have quite a few places where we get a const class ref and require it to be default.
Diffstat (limited to 'Zend/tests/interface_extends_static.phpt')
-rw-r--r--Zend/tests/interface_extends_static.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/interface_extends_static.phpt b/Zend/tests/interface_extends_static.phpt
new file mode 100644
index 0000000000..3d12070ec8
--- /dev/null
+++ b/Zend/tests/interface_extends_static.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Interface cannot extend static, as it is reserved
+--FILE--
+<?php
+
+interface Foo extends static {}
+
+?>
+--EXPECTF--
+Fatal error: Cannot use 'static' as interface name, as it is reserved in %s on line %d