From 35e70db263da6444b2a94f1d575ee9b2a7e515b6 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sun, 22 Apr 2018 17:23:47 +0000 Subject: [PATCH] Remove obsolete PHP 4 info git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344801 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/operators.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/language/operators.xml b/language/operators.xml index 96c5d8a4a2..4f65bb831b 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -508,7 +508,7 @@ $b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!"; An exception to the usual assignment by value behaviour within PHP occurs - with objects, which are assigned by reference in PHP 5. + with objects, which are assigned by reference. Objects may be explicitly copied via the clone keyword. @@ -544,7 +544,7 @@ print "$b\n"; // prints 4 as well, since $b is a reference to $a, which has - As of PHP 5, the new + The new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and @@ -1435,9 +1435,8 @@ echo $a <=> $b; // 1 object object Built-in classes can define its own comparison, different classes - are uncomparable, same class - compare properties the same way as - arrays (PHP 4), PHP 5 has its own explanation + are uncomparable, same class see Object Comparison