SplFixedArray_offsetGet_integer.phpt 357 B

12345678910111213141516171819
  1. --TEST--
  2. Using SplFixedArray::offsetGet() with various types
  3. --CREDITS--
  4. Gabriel Caruso (carusogabriel34@gmail.com)
  5. --FILE--
  6. <?php
  7. $arr = new SplFixedArray(2);
  8. $arr[0] = 'foo';
  9. $arr[1] = 'bar';
  10. var_dump($arr->offsetGet(0.2));
  11. var_dump($arr->offsetGet(false));
  12. var_dump($arr->offsetGet(true));
  13. ?>
  14. --EXPECT--
  15. string(3) "foo"
  16. string(3) "foo"
  17. string(3) "bar"