PHP extend library