1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 17:43:13 +02:00
Files
archived-php-src/Zend/tests/bug79477.phpt
Nikita Popov 79a36ff7f3 Fixed bug #79477
Make sure to deindirect properties when creating array.
2020-04-15 11:21:05 +02:00

21 lines
269 B
PHP

--TEST--
Bug #79477: casting object into array creates references
--FILE--
<?php
class Test {
public $prop = 'default value';
}
$obj = new Test;
$obj->{1} = null;
$arr = (array) $obj;
$arr['prop'] = 'new value';
echo $obj->prop, "\n";
?>
--EXPECT--
default value