Personal php code snippet