PHP Graph classes