Hi Go Kudo,

I think this proposal is much better than the one before. I believe we need
such functionality in PHP.
I have some questions I would like you to consider:
1. I'm still not a fan of exposing the algorithms as separate classes in
PHP. Their names are confusing and I don't see how exposing them gives any
benefits. I would prefer that, like in password_hash, let the user chose
the algorithm using a constant then ask for seed as a second argument
to Randomizer.
2. Why is there a getter on Randomizer for the source?
3. Why is the interface called source?
4. You have generateInt() twice. Wouldn't it be better to have it only once
but make the arguments nullable or provide PHP_MIN_INT and PHP_MAX_INT as
defaults?
5. Why do we need to deprecate the old functions now? What's the rush?

Regards,
Kamil

Reply via email to