note 75736 deleted from language.oop5.cloning by danielc
| From: | danielc@php.net | Date: | Sun, 27 Jul 2008 05:36:54 +0000 |
| Subject: | note 75736 deleted from language.oop5.cloning by danielc | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142805@lists.php.net to get a copy of this message | ||
Note Submitter: Mr.KTO
Reason: 2
----
In PHP4 the clone keyword isn't defined, if you want a compatible code (using a copy of an
object) - use this fix:
$c = (PHP_VERSION < 5) ? $b : clone($b);
It is possible cause php checks function existence just before its calling.