xref: /PHP-8.0/ext/spl/tests/fixedarray_013.phpt (revision f8d79582)
1--TEST--
2SPL: FixedArray: Passing the object using [] as parameter
3--FILE--
4<?php
5
6$a = new SplFixedArray(100);
7
8
9function test(SplFixedArray &$arr) {
10    print "ok\n";
11}
12
13try {
14    test($a[]);
15} catch (Exception $e) {
16    echo $e->getMessage(), "\n";
17}
18
19?>
20--EXPECT--
21Index invalid or out of range
22