That would make more sense if there was an expectation that people might want to change it, as might be the case for logging (the PR of which seems to have stalled meh) but in this case, I'm not sure why you would want to change it. For owncloud you say "the cache can be easily replaced with an implementation that persists over requests, e.g. xCache" but I'm not sure persisting a stat cache over multiple requests is a good idea. The statcache, in PHP, causes enough problems as is, without persistence. I understand why it's done but idk..  if there's a valid use case for why you'd want to change it I'd be more willing to consider it.

Also, unless there's a compelling reason for why this ought to be done in the php5 branch but not in master, I'd suggest we keep both the same. Moving crypt_random over to a class for the php5 branch is a change with a compelling reason - it works better with auto loaders. But in this case...  I don't see why it'd need to use PHP5 exclusive code and in theory I think anything that could work in master ought to be put in master. And if there's not a good reason for having it in master than it ought not go in the php5 branch either.