I like the idea. Then we can have a standalone error_codes.h and simplifies documenting them.
Create a ticket for it: https://jira.mongodb.org/browse/PHP-806