Tracking Changes In PHP Properties - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Tracking Changes In PHP Properties (855 Views)
| Tracking Changes In PHP Properties by Nobody: 9:17am On May 27, 2013 |
Hi guys, i got a request to create a script that sends mail of a member anytime there's a new change in Profile, so that the mail will send the new changes, so here is my take on it, wanted to know if this solution is optimal in terms of Memory consumption and design. 1. Collect all the Profile Data and Store in a Class and serialize and store in Db. 2. Then When next user changes his data, check to see if an old class serialized exists, 3. If it does then pull from database and (Reflection API)Scan the properties and some array of Images which will be retrieved from WordPress 4. Store the new files in New Changes not in Old changes into an addition array, then store the Old data not in New data in removed array. 5.Then update the serialize object to the recent one and it goes on and on. Now my question is does PHP iterate over all properties including StdClass or just my class, because in Java and C#, all Objects inherit from (Java.util.Object and whatever's C# inherits from). it will be a mess scanning all properties. |
| Re: Tracking Changes In PHP Properties by Nobody: 11:21am On May 27, 2013 |
|
| Re: Tracking Changes In PHP Properties by Nobody: 11:27am On May 27, 2013 |
It works now for properties, now for methods will have to reflect each method and get return value and check the return type and compare with each other if they are of the same data type and not resources.
|
| Re: Tracking Changes In PHP Properties by Nobody: 11:29am On May 27, 2013 |
NOTE: It doesn't check variable_type so its a bit error prone. obviously "12" !== 12 will return false. will update laster |
Online Shopping System In Php Documentation Help • Running Python Codes In Php • How To Create A Shipping Tracking On Website.? • 2 • 3 • 4
Respondents To Agile Software Development Survey Wanted For Research Purposes. • How To Programme A PBX • I Need Best Ebook For Java