summaryrefslogtreecommitdiff
path: root/Zend/tests/const_array_with_resource_key.phpt
blob: 0bf546af50930620b6932fcb1ff8e97f1d976871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
}