SplFixedArray_fromarray_indexes.phpt 488 B

12345678910111213141516171819202122
  1. --TEST--
  2. Create a SplFixedArray from an array using the fromArray() function use the default behaviour of preserve the indexes.
  3. --CREDITS--
  4. Philip Norton philipnorton42@gmail.com
  5. --FILE--
  6. <?php
  7. $array = SplFixedArray::fromArray(array(1 => 1,
  8. 2 => '2',
  9. 3 => false));
  10. var_dump($array);
  11. ?>
  12. --EXPECT--
  13. object(SplFixedArray)#1 (4) {
  14. [0]=>
  15. NULL
  16. [1]=>
  17. int(1)
  18. [2]=>
  19. string(1) "2"
  20. [3]=>
  21. bool(false)
  22. }