We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a505fe5 commit 68f5063Copy full SHA for 68f5063
1 file changed
tests/classes/inner_classes/aliases.phpt
@@ -0,0 +1,18 @@
1
+--TEST--
2
+aliases cannot escape
3
+--FILE--
4
+<?php
5
+
6
+class Outer {
7
+ private class Inner {}
8
+}
9
10
+class_alias(Outer\Inner::class, 'InnerAlias');
11
12
+new InnerAlias();
13
+?>
14
+--EXPECTF--
15
+Fatal error: Uncaught TypeError: Cannot instantiate class Outer\Inner from the global scope in %s:%d
16
+Stack trace:
17
+#0 {main}
18
+ thrown in %s on line %d
0 commit comments