language/oop5/cloning.xml
28529d3539b850e870e3aa97570f4db0e53daa03
...
...
@@ -16,10 +16,9 @@
16
16
</para>
17
17

18
18
<para>
19
-
An object copy is created by using the <emphasis>clone</emphasis> keyword (which calls the
20
-
object's <link linkend="object.clone">__clone()</link> method if possible).
21
-
An object's <link linkend="object.clone">__clone()</link> method
22
-
cannot be called directly.
19
+
An object copy is created by using the <literal>clone</literal> keyword
20
+
(which calls the object's <link linkend="object.clone">__clone()</link>
21
+
method if possible).
23
22
</para>
24
23

25
24
<informalexample>
...
...
@@ -87,10 +86,10 @@ $obj->object2 = new SubObject();
87
86
$obj2 = clone $obj;
88
87

89
88

90
-
print("Original Object:\n");
89
+
print "Original Object:\n";
91
90
print_r($obj);
92
91

93
-
print("Cloned Object:\n");
92
+
print "Cloned Object:\n";
94
93
print_r($obj2);
95
94

96
95
?>
...
...
@@ -134,7 +133,7 @@ MyCloneable Object
134
133
</example>
135
134

136
135
<para>
137
-
PHP 7.0.0 introduced the possibility to access a member of a freshly cloned
136
+
It is possible to access a member of a freshly cloned
138
137
object in a single expression:
139
138
</para>
140
139
<example>
141
140