PHP Classes

PHP Object Copy Properties: Copy values of an object to another

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 53 All time: 10,431 This week: 361Up
Version License PHP version Categories
php-object-copy 1.0GNU General Publi...5PHP 5, Data types


The package can copy values of an object to another.

It can take as parameters two given objects and uses reflection to discover their class variables, so it can copy those class variable values from the source object to the destination object.

The class can use getter functions to get the source object class variable values and setter functions to set the destination object class variable values.

It may also optionally exclude from the copy process class variables that are private, or static or protected.

Picture of Juraj Puchký
  Performance   Level  
Name: Juraj Puchký is available for providing paid consulting. Contact Juraj Puchký .
Classes: 17 packages by
Country: Czech Republic Czech Republic
Age: 41
All time rank: 110511 in Czech Republic Czech Republic
Week rank: 310 Up3 in Czech Republic Czech Republic Up
Innovation award
Innovation award
Nominee: 6x



Simple implementation of copy properties from one object to another by Reflection API.

  Files folder image Files  
File Role Description
Files folder imageexamples (1 file)
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file simple-copy.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file ObjectCopier.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,431
This week:361Up