- mt_rand: documentation ( source)
<?php
$iterations = 100000;
$container = new ArrayObject(array());
class A
{
protected $number;
public function __construct()
{
$this->number = mt_rand(1, 10000);
}
}
for ($i = 0; $i <= $iterations; ++$i) {
$someVariable = new A;
$container[] = $someVariable;
}