mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
26 lines
358 B
PHP
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)
|