mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
* Move spl_offset_convert_to_long() to spl_fixedarray.c It is only used there, which explains its weird offset semantics * Refactor SplFixedArray offset handling - Implement warning for resource type - Throw a proper TypeError instead of a RuntimeException * Use a proper Error to signal that [] cannot be used with SplFixedArray * Refactor SplFixedArray has_dimension helper * Drop some ZPP tests
20 lines
277 B
PHP
20 lines
277 B
PHP
--TEST--
|
|
SPL: FixedArray: Assigning the object to another variable using []
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = new SplFixedArray(100);
|
|
|
|
try {
|
|
$b = &$a[];
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
print "ok\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
[] operator not supported for SplFixedArray
|
|
ok
|