summaryrefslogtreecommitdiff
path: root/Zend/tests/const_array_with_resource_key.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/const_array_with_resource_key.phpt')
-rw-r--r--Zend/tests/const_array_with_resource_key.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/const_array_with_resource_key.phpt b/Zend/tests/const_array_with_resource_key.phpt
new file mode 100644
index 0000000000..0bf546af50
--- /dev/null
+++ b/Zend/tests/const_array_with_resource_key.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Constexpr arrays should be able to handle resource keys
+--FILE--
+<?php
+
+const FOO = [STDIN => 42];
+var_dump(FOO);
+
+?>
+--EXPECTF--
+Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+array(1) {
+ [%d]=>
+ int(42)
+}