const_array_with_resource_key.phpt 251 B

123456789101112131415
  1. --TEST--
  2. Constexpr arrays should be able to handle resource keys
  3. --FILE--
  4. <?php
  5. const FOO = [STDIN => 42];
  6. var_dump(FOO);
  7. ?>
  8. --EXPECTF--
  9. Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
  10. array(1) {
  11. [%d]=>
  12. int(42)
  13. }