php code for self-study