/** * @param integer $size * @param array $elements */ public function __construct($size = 1024, array $elements = array()) { $this->size = (int) $size; $this->size = $this->size < 1 ? 1 : $this->size; parent::__construct($elements); $count = $this->count(); for ($i = $count; $i < $this->size; $i++) { $this->elements[$i] = null; } }