You can use the 'clone' operator inside PHP5 to copy physical objects:
<?php
//our original object is $objectA
$objectB = clone $objectA;
?>
Also, it's just objects which are passed by reference, definitely not everything.
<?php
//our original object is $objectA
$objectB = clone $objectA;
?>
0 comments:
Post a Comment