Open In App

PHP | XMLReader getParserProperty() Function

The XMLReader::getParserProperty() function is an inbuilt function in PHP which is used to check if specified property has been set or not.

Syntax:



bool XMLReader::getParserProperty( int $property )

Parameters: This function accepts a single parameter $property which holds an integer corresponding to one of PARSER Options constants.
List of Parser Options constants are given below:

Return Value: This function returns TRUE on success or FALSE on failure.



Exceptions: This function throws XMLReaderException on error.

Below examples illustrate the XMLReader::getParserProperty() function in PHP:

Example 1:

Example 2:

Reference:https://www.php.net/manual/en/xmlreader.getparserproperty.php


Article Tags :