Often it is easier to work with a preexisting PHP program than to sit down and write your own from scratch. Sometimes these programs come close to doing what you want, but don't do exactly what you want. In these cases you may want to go into the existing code and modify it for your needs. When doing this, here are some things to keep in mind.
Time Required: Varies
- Look at the license of the program. Does it allow you to make changes for your own use? Does it allow you to distribute the changes once they are made? Are you allowed to use the program for personal or commercial use? Never work with someone else's code if you don't have permission to do so!
- Always keep a backup of the original files! We all have "broke" programs at some point in time. Make sure you keep a copy of all the original files on hand for when this inevitably happens to you, so you can successfully backtrack and see where you went wrong.
- Leave lots of comments! If you leave notes to yourself or other programmers about what and why you have changed the original code, it makes future edits and easier.
- Give the original author credit. Whether you plan to redistribute the code with your changes, or you're just running it on your personal website, make sure all author lines are left intact. By all means add your own information as well, but always continue to give credit to the original author.