Hi!

> Also, FWIW, anyone who used the Suhosin patch couldn’t use srand()
> because it disabled it.

And? You can disable any function in PHP, that doesn't mean anything.

> Because if we don’t break it, people will continue to rely on it, and
> this binds our hands for future versions.

Sorry, that doesn't sound even remotely like a good reason. It doesn't
provide any benefit to the user, but produces problems for those who use
it. The gain for the users is zero, the added trouble - for those who
use the feature - is substantial.

> Also, those people will have their code break anyway if they upgrade
> their OS and it changes its random number generator.

If they used mt_rand that is not true. And OS RNG changes are not that
frequent. E.g. the manual for srand on Mac (and, likely, all BSD) says:

The srand() function sets its argument seed as the seed for a new
sequence of pseudo-random numbers to be returned by rand().
These sequences are repeatable by calling srand() with the same seed value.

The Linux manual says:

The  srand()  function  sets  its  argument  as the seed for a new
sequence of pseudo-random integers to be returned by rand().
These sequences are repeatable by calling srand() with the same seed value.


I would say the expectation here is pretty clear.

> Just because people do rely on it doesn’t mean they should or that we
> should continue to allow them to.

It doesn't mean they should, but it does mean it is a BC break, and one
that produces no discernible gain at that.

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to