Do not include unbound anonymous classes in get_declared_classes(). Note that earlier PHP versions would include the anonymous class in get_declared_classes(), and return false until the class was bound, but would not crash.