Documentation for Ice 3.4. The latest release is Ice 3.7. Refer to the space directory for other releases.

A Slice sequence maps to a native PHP indexed array. The first element of the Slice sequence is contained at index 0 (zero) of the PHP array, followed by the remaining elements in ascending index order.

Consider this example:

Slice
sequence<Fruit> FruitPlatter;

You can create an instance of FruitPlatter as shown below:

PHP
// Make a small platter with one Apple and one Orange
//
$platter = array(Fruit::Apple, Fruit::Orange);

The Ice run time validates the elements of an array to ensure that they are compatible with the declared type and raises InvalidArgumentException if an incompatible type is encountered.

See Also
  • No labels