mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_arrayiterator_with_objects This also moves tests into a subfolder.
17 lines
659 B
PHP
17 lines
659 B
PHP
--TEST--
|
|
Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken)
|
|
--FILE--
|
|
<?php
|
|
for ($i = 0; $i<2; $i++) {
|
|
$data = new \ArrayObject(new stdClass(), ArrayObject::ARRAY_AS_PROPS);
|
|
$data->itemType = 'bulletin';
|
|
var_dump(!is_null($data['itemType']));
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in %s on line %d
|
|
bool(true)
|
|
|
|
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in %s on line %d
|
|
bool(true)
|