2024 日本 PHP 研討會

XMLWriter::outputMemory

xmlwriter_output_memory

(PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL xmlwriter >= 0.1.0)

XMLWriter::outputMemory -- xmlwriter_output_memory傳回目前的緩衝區

說明

物件導向風格

public XMLWriter::outputMemory(bool $flush = true): string

程序式風格

xmlwriter_output_memory(XMLWriter $writer, bool $flush = true): string

傳回目前的緩衝區。

參數

writer

僅適用於程序呼叫。正在被修改的 XMLWriter 實例。此物件是由呼叫 xmlwriter_open_uri()xmlwriter_open_memory() 所返回。

flush

是否清空輸出緩衝區。預設值為 true

返回值

返回目前的緩衝區內容,以字串形式呈現。

更新日誌

版本 說明
8.0.0 writer 現在需要一個 XMLWriter 實例;以前需要的是 資源

參見

新增筆記

使用者貢獻的筆記

此頁面沒有使用者貢獻的筆記。
To Top