Basically: NO . Not something with php.
HOWEVER ... A consistent scheme, for example, from the SHOW CREATE <table_name>; command SHOW CREATE <table_name>; is still a reliable way to do what you are talking about - if it is rather nontrivial in nature. You must be very knowledgeable about the details in the mechanics of defining a circuit if you want to detect and reproduce this. However, you can develop a custom field that keeps track of the version number that you update when updating the schema. Then at least you should know when to update other replication goals - by comparing the data in this version field.
As I usually saw, this is implemented to track all ALTER TABLE commands (etc.) and track them. You can check something like the "r12345.sql" file in SVN for the db automatic update system. This is due to the fact that I mean that php script can check all .sql db schema files and execute each of them (sequentially), which will reproduce the changes in the current database.
A lot depends on what you are trying to accomplish. If you provide more information, I would outline.
source share