Home
last modified time | relevance | path

Searched refs:clone (Results 1 – 25 of 233) sorted by relevance

12345678910

/php-src/ext/bcmath/tests/number/
H A Dclone.phpt2 BcMath\Number clone
29 $clone = clone $num;
30 if ($num->value !== $clone->value || $num->scale !== $clone->scale || $num === $clone) {
32 var_dump($num, $clone);
/php-src/ext/date/tests/
H A DDateTimeZone_clone_basic1.phpt2 Test clone on DateTimeZone objects
9 echo "*** Testing clone on DateTime objects ***\n";
14 // ..create a clone of it ..Clone
15 $clone = clone $orig;
18 var_dump($clone);
20 if ($clone != $orig) {
22 }else if ($clone === $orig) {
30 *** Testing clone on DateTime objects ***
H A DDateTime_clone_basic1.phpt2 Test clone on DateTime objects
9 echo "*** Testing clone on DateTime objects ***\n";
14 // ..create a clone of it ..Clone
15 $clone = clone $orig;
21 echo "Clone: " . $clone->format("H:i:s") . "\n";
25 *** Testing clone on DateTime objects ***
H A DDateTimeZone_clone_basic3.phpt2 Test clone of DateTimeZOne objects
8 echo "*** Testing clone on DateTime objects ***\n";
17 echo "\n-- clone it --\n";
18 $d1_clone = clone $d1;
24 echo "\n-- clone it --\n";
25 $d2_clone = clone $d1_clone;
29 *** Testing clone on DateTime objects ***
55 -- clone it --
87 -- clone it --
H A DDateTime_clone_basic3.phpt2 Test clone of DateTime objects
8 echo "*** Testing clone on DateTime objects ***\n";
17 echo "\n-- clone it --\n";
18 $d1_clone = clone $d1;
24 echo "\n-- clone it --\n";
25 $d2_clone = clone $d1_clone;
29 *** Testing clone on DateTime objects ***
59 -- clone it --
95 -- clone it --
H A DDateTimeZone_clone_basic4.phpt2 Test clone of DateTimeZone derived objects with __clone magic method
14 echo "*** Testing clone of objects derived from DateTimeZone class with __clone magic method***\n";
17 $d1_clone = clone $d1;
19 //verify clone by calling method on new object
24 *** Testing clone of objects derived from DateTimeZone class with __clone magic method***
H A DDateTime_clone_basic4.phpt2 Test clone of DateTime derived objects with __clone magic method
17 echo "*** Testing clone of objects derived from DateTime class with __clone magic method***\n";
20 $d1_clone = clone $d1;
22 //verify clone by calling method on new object
27 *** Testing clone of objects derived from DateTime class with __clone magic method***
/php-src/Zend/tests/
H A Dclone_002.phpt2 Testing multiple clone statements
6 $a = clone clone $b = new stdClass;
10 $c = clone clone clone $b = new stdClass;
15 $d = clone $a = $b = new foo;
H A Dbug68262.phpt13 $clone = clone $first;
17 $clone = clone $first;
18 $clone->p = 'foo';
H A Dbug27268.phpt2 Bug #27268 (Bad references accentuated by clone)
17 $clone = clone $A;
18 $clone->a = array();
/php-src/ext/dom/tests/modern/spec/
H A Dclone_text_nodes.phpt22 $clone = clone $root;
23 var_dump($clone->firstChild->textContent);
24 var_dump($clone->firstChild->nextSibling->textContent);
25 var_dump($clone->firstChild->nextSibling->nextSibling->textContent);
26 echo $dom->saveXml($clone), "\n";
28 $clone = $child2->cloneNode(true);
29 echo $dom->saveXml($clone), "\n";
31 $clone = $child2->cloneNode(false);
32 echo $dom->saveXml($clone), "\n";
H A Dclone_document.phpt30 $clone = clone $dom;
31 echo $clone->saveXml(), "\n";
33 var_dump($clone->getElementsByTagName("child2")[0]->firstChild->nodeName);
37 $clone = $dom->cloneNode(false);
38 echo $clone->saveXml(), "\n";
42 $clone = $dom->documentElement->cloneNode(false);
43 echo $clone->ownerDocument->saveXml($clone), "\n";
H A Dclone_conflicting_namespace_prefix.phpt2 Test clone with conflicting namespace prefix
25 $clone = clone $dom->documentElement->firstElementChild;
26 var_dump($clone->nodeName, $clone->namespaceURI);
28 foreach ($clone->attributes as $attr) {
32 echo $dom->saveXml($clone), "\n";
/php-src/Zend/tests/lazy_objects/
H A Dclone_calls___clone_once.phpt2 Lazy objects: clone calls __clone() once
13 var_dump("clone");
21 $clone = clone $obj;
25 var_dump($reflector->isUninitializedLazyObject($clone));
26 var_dump($clone);
48 string(5) "clone"
61 string(5) "clone"
H A Dclone_preverves_object_class.phpt2 Lazy objects: clone returns an object of the same class
24 $clone = clone $b;
26 only_b($clone);
29 var_dump($clone::class);
/php-src/ext/spl/tests/
H A DarrayObject_clone_basic2.phpt11 $c->p1 = 'new prop added to c before clone';
13 $ao2 = clone $ao1;
15 $c->p2 = 'new prop added to c after clone';
23 string(32) "new prop added to c before clone"
25 string(31) "new prop added to c after clone"
33 string(32) "new prop added to c before clone"
35 string(31) "new prop added to c after clone"
44 string(32) "new prop added to c before clone"
H A DarrayObject_clone_basic3.phpt16 $wrappedObject->dynamic1 = 'new prop added to $wrappedObject before clone';
17 $clonedOuterArrayObject = clone $outerArrayObject;
18 $wrappedObject->dynamic2 = 'new prop added to $wrappedObject after clone';
31 string(45) "new prop added to $wrappedObject before clone"
33 string(44) "new prop added to $wrappedObject after clone"
45 string(45) "new prop added to $wrappedObject before clone"
47 string(44) "new prop added to $wrappedObject after clone"
62 string(45) "new prop added to $wrappedObject before clone"
64 string(44) "new prop added to $wrappedObject after clone"
78 string(45) "new prop added to $wrappedObject before clone"
H A DarrayObject_clone_basic1.phpt7 $a['p1'] = 'new element added to a before clone';
9 $aa2 = clone $aa1;
11 $a['p2'] = 'new element added to a after clone';
23 string(35) "new element added to a before clone"
25 string(34) "new element added to a after clone"
/php-src/ext/dom/tests/
H A Dclone_attribute_namespace_01.phpt14 $clone = $attr->cloneNode(true);
16 return [$dom, $clone];
19 [$dom, $clone] = createTestDocument();
20 var_dump($clone->prefix, $clone->namespaceURI);
24 [$dom, $clone] = createTestDocument();
27 $dom->documentElement->setAttributeNodeNs($clone);
33 [$dom, $clone] = createTestDocument();
38 $child->{$method}($clone);
54 [$dom, $clone] = createTestDocument();
56 var_dump($clone->prefix, $clone->namespaceURI);
H A Dgh14652.phpt10 $clone = clone $attr;
14 var_dump($clone->value);
/php-src/ext/simplexml/tests/
H A Dbug39662.phpt14 $clone = clone $root;
16 var_dump($clone);
17 var_dump($clone->asXML());
/php-src/ext/intl/tests/
H A Dbug81019.phpt2 Bug #81019: Unable to clone NumberFormatter after failed parse()
10 $fmt2 = clone $fmt;
14 $datefmt2 = clone $datefmt;
18 $msgfmt2 = clone $msgfmt;
H A Dtimezone_clone_basic.phpt2 IntlTimeZone clone handler: basic test
11 print_r(clone $tz1);
13 //clone non-owned object
16 print_r(clone $gmt);
/php-src/tests/classes/
H A Dclone_006.phpt28 $clone = clone $original;
30 echo $clone->id . "\n";
31 echo $clone->name . "\n";
32 echo $clone->address . "\n";
/php-src/Zend/tests/objects/
H A Dobjects_031.phpt6 $x[] = clone new stdclass;
7 $x[] = clone new stdclass;
8 $x[] = clone new stdclass;

Completed in 37 milliseconds

12345678910