fixedarray_013.phpt 310 B

123456789101112131415161718192021
  1. --TEST--
  2. SPL: FixedArray: Passing the object using [] as parameter
  3. --FILE--
  4. <?php
  5. $a = new SplFixedArray(100);
  6. function test(SplFixedArray &$arr) {
  7. print "ok\n";
  8. }
  9. try {
  10. test($a[]);
  11. } catch (\Error $e) {
  12. echo $e->getMessage(), "\n";
  13. }
  14. ?>
  15. --EXPECT--
  16. [] operator not supported for SplFixedArray