fixedarray_009.phpt 304 B

12345678910111213
  1. --TEST--
  2. SPL: FixedArray: Trying to instantiate passing string to construtor parameter
  3. --FILE--
  4. <?php
  5. try {
  6. $a = new SplFixedArray('FOO');
  7. } catch (TypeError $iae) {
  8. echo "Ok - ".$iae->getMessage().PHP_EOL;
  9. }
  10. ?>
  11. --EXPECT--
  12. Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given