summaryrefslogtreecommitdiff
path: root/Zend/tests/bug79477.phpt
blob: cb5340d104775ceb27c00d295c551820b27afc05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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