/** * Constructs an instance of this class. * * @param int|null $memoryBufferSize maximum number of bytes to keep in memory before using a temporary file */ public function __construct($memoryBufferSize = null) { $uri = 'php://temp'; if ((int) $memoryBufferSize > 0) { $uri .= '/maxmemory:' . (int) $memoryBufferSize; } parent::__construct($uri); }
/** * Constructs an instance of this class. */ public function __construct() { parent::__construct('php://memory'); }