php-src/Zend/tests/clone_002.phpt
2008-05-11 22:44:56 +00:00

26 lines
358 B
PHP

--TEST--
Testing multiple clone statements
--FILE--
<?php
$a = clone clone $b = new stdClass;
var_dump($a == $b);
$c = clone clone clone $b = new stdClass;
var_dump($a == $b, $b == $c);
class foo { }
$d = clone $a = $b = new foo;
var_dump($a == $d, $b == $d, $c == $a);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)