public function __construct($stack = null) { if (is_array($stack)) { $this->_array = $stack; $this->_arraySize = count($stack); } elseif (is_string($stack)) { $this->write($stack); } else { $this->_array = array(); } }