1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/spl/tests/ArrayObject/bug69845.phpt

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)