PHP 8.5.0 Beta 3 available for testing

XMLReader::fromString

(PHP 8 >= 8.4.0)

XMLReader::fromStringXML 文字列から、XMLReader を作成する

説明

public static XMLReader::fromString(string $source, ?string $encoding = null, int $flags = 0): static

XML 文字列から、XMLReader を作成します。

パラメータ

source

パースされる XML を含む文字列。

encoding

ドキュメントのエンコーディングあるいは null

flags

LIBXML_* 定数のビットマスク。

戻り値

XMLReader を返します。

エラー / 例外

  • 不正な encoding を渡すと、 ValueError をスローします。

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top