summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug41692.phpt
blob: 8a2b958fc16aa167e4c48c3063f5aa6331293578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--TEST--
Bug #41692 (ArrayObject shows weird behaviour in respect to inheritance)
--FILE--
<?php

class Bar extends ArrayObject {
    private $foo = array( 1, 2, 3 );
    function __construct()
    {
        parent::__construct($this->foo);
    }
}

$foo = new Bar();
var_dump($foo);
$foo['foo'] = 23;

$bar = new Bar();
var_dump($bar);

echo "Done\n";
?>
--EXPECTF--	
object(Bar)#%d (3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
object(Bar)#%d (3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
Done