From what ive heard in #php not possible. A solution would be to put the defintions into an XML file and catch XML parsing errors.