~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to Zend/tests/bug27268.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #27268 (Bad references accentuated by clone)
 
3
--FILE--
 
4
<?php
 
5
class A
 
6
{
 
7
    public function &getA()
 
8
    {
 
9
        return $this->a;
 
10
    }
 
11
}
 
12
 
 
13
$A = new A;
 
14
$A->a = array(1);
 
15
$x = $A->getA();
 
16
$clone = clone $A;
 
17
$clone->a = array();
 
18
print_r($A);
 
19
?>
 
20
--EXPECT--
 
21
A Object
 
22
(
 
23
    [a] => Array
 
24
        (
 
25
            [0] => 1
 
26
        )
 
27
 
 
28
)