mirror of
https://github.com/php/php-src.git
synced 2024-12-04 23:34:25 +08:00
23 lines
341 B
PHP
23 lines
341 B
PHP
--TEST--
|
|
SPL FixedArray can reduce size of array
|
|
--CREDITS--
|
|
PHPNW TestFest 2009 - Ben Longden
|
|
--FILE--
|
|
<?php
|
|
$array = new SplFixedArray(5);
|
|
$array[0] = 'a';
|
|
$array[1] = 'b';
|
|
$array[2] = 'c';
|
|
$array[3] = 'd';
|
|
$array[4] = 'e';
|
|
$array->setSize(3);
|
|
print_r($array);
|
|
?>
|
|
--EXPECT--
|
|
SplFixedArray Object
|
|
(
|
|
[0] => a
|
|
[1] => b
|
|
[2] => c
|
|
)
|