Description:
------------
When I use underscores in $protocol parameter for stream_wrapper_register(), I get an error telling me that PHP was "Unable to register wrapper class ...". In main/streams/userspace. this error is thrown and one can find the comment "/* Should never happen */" above it.
Either the comment is wrong or there should be a check for the validity of the protocal name.

The comment is most likely wrong, the call fails because php_register_url_stream_wrapper_volatile returns FAILURE.
The reason it returns FAILURE because php_register_url_stream_wrapper_volatile then runs php_stream_wrapper_scheme_validate which fails because the protocol isn't /^[a-zA-Z0-9+.-]+$/
The error could well be clarified.

This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.