php discovery example