mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
22 lines
334 B
PHP
22 lines
334 B
PHP
--TEST--
|
|
SPL: FixedArray: Passing the object using [] as parameter
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = new SplFixedArray(100);
|
|
|
|
|
|
function test(SplFixedArray &$arr) {
|
|
print "ok\n";
|
|
}
|
|
|
|
try {
|
|
test($a[]);
|
|
} catch (\Error $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Error: [] operator not supported for SplFixedArray
|