In PHP 4 everything, including objects, was passed by value. This has been changed in PHP 5 where everything is passed by reference. ... This is a typical PHP 4 code - if you wanted to duplicate an object, you had to copy it and assign a new value to it. In PHP 5 the coder can simply use the "clone".