bug70853.phpt 276 B

123456789101112131415
  1. --TEST--
  2. Bug #70853 (SplFixedArray throws exception when using ref variable as index)
  3. --FILE--
  4. <?php
  5. $list = new SplFixedArray(10);
  6. $ndx = 1;
  7. $ndx2 =& $ndx;
  8. $list[$ndx] = 123; // This throws an exception;
  9. $list[$ndx2] = 123; // as does this, to.
  10. echo 'ok';
  11. ?>
  12. --EXPECT--
  13. ok