summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-06-03 23:59:59 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-06-03 23:59:59 +0200
commit1d3f77d13d2b457bdf1bc52045da4679741e65cb (patch)
tree6e98d6a4456de81f53924fbf91840a0d72bec2fb /Zend/tests
parent2fcdad6a58e0f4e1dd78fbc4f9dec4ea2c868088 (diff)
downloadphp-git-1d3f77d13d2b457bdf1bc52045da4679741e65cb.tar.gz
Fix Bug #69754 (Compile failure with ::class in array)
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/bug69754.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/bug69754.phpt b/Zend/tests/bug69754.phpt
new file mode 100644
index 0000000000..be55ae2b78
--- /dev/null
+++ b/Zend/tests/bug69754.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #69754 (Use of ::class inside array causes compile error)
+--FILE--
+<?php
+
+class Example {
+ public function test() {
+ var_dump(static::class);
+ var_dump(static::class . 'IsAwesome');
+ var_dump(static::class . date('Ymd'));
+ var_dump([static::class]);
+ }
+}
+
+(new Example)->test();
+
+?>
+--EXPECTF--
+string(7) "Example"
+string(16) "ExampleIsAwesome"
+string(15) "Example%d"
+array(1) {
+ [0]=>
+ string(7) "Example"
+}