Clone Clone Clone

no-email (Damien Seguy), Damien Seguy
Tue, 26 Sep 2023 00:00:00 +0000

It is possible to chain clone operators : PHP optimize this and skips any intermediate clone. The resulting final object is number 2, so the inner clones were duly ignored.
On the other hand, it is possible to create a new object from an existing object, but it is not possible to chain the new calls without using parenthesis.