mirror of
https://github.com/php/php-src.git
synced 2024-10-03 15:56:11 +00:00
22 lines
287 B
PHP
22 lines
287 B
PHP
--TEST--
|
|
SPL: FastArray: Passing the object using [] as parameter
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = new SplFastArray(100);
|
|
|
|
|
|
function test(SplFastArray &$arr) {
|
|
print "ok\n";
|
|
}
|
|
|
|
try {
|
|
test($a[]);
|
|
} catch (Exception $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Index invalid or out of range
|