Link Details

Link 285237 thumbnail
User 375791 avatar

By etoolbox
via electrictoolbox.com
Submitted: Nov 09 2009 / 12:49

Objects in PHP are assigned by reference, so copying an object with the = operator will result in a second variable referencing the same object and not an actual copy. Enter PHP's clone function which creates a shallow copy of the object.
  • 3
  • 0
  • 119
  • 9

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)



Voters Against This Link (0)