PHP | DOMText isElementContentWhitespace() Function Last Updated : 13 Mar, 2020 Comments Improve Suggest changes Like Article Like Report The DOMText::isElementContentWhitespace() function is an inbuilt function in PHP which is used to check whether this text node contains whitespace in element content or not. Syntax: bool DOMText::isElementContentWhitespace( void ) Parameters: This function doesn’t accept any parameters. Return Value: This function returns TRUE on success or FALSE on failure. Below given programs illustrate the DOMText::isElementContentWhitespace() function in PHP: Program 1: php <?php // Create the text Node with no whitespace $text = new DOMText('No_Space'); // Check if whitespace is not there if(!$text->isElementContentWhitespace()) { echo 'No ! Whitespace is not there.'; } ?> Output: No ! Whitespace is not there. Program 2: php <?php // Create the text Node with a space $text = new DOMText('Yes Space'); // Check if whitespace is there if($text->isElementContentWhitespace()) { echo 'Yes ! Whitespace is there.'; } ?> Output: Yes ! Whitespace is there. Reference: https://www.php.net/manual/en/domtext.iselementcontentwhitespace.php Comment More infoAdvertise with us Next Article PHP | DOMText isElementContentWhitespace() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-DOM Similar Reads PHP | DOMNode isDefaultNamespace() Function The DOMNode::isDefaultNamespace() function is an inbuilt function in PHP which is used to check if the specified namespaceURI is the default namespace or not. Syntax: bool DOMNode::isDefaultNamespace( string $namespaceURI ) Parameters: This function accepts a single parameter $namespaceURI which hol 1 min read PHP | IntlChar::isWhitespace() Function The IntlChar::isWhitespace() function is an inbuilt function in PHP which is used to check whether the given input character is a WhiteSpace character or not according to ICU. IntlChar access number utility function and used to access the information about Unicode Characters. The White Space charact 2 min read PHP | IntlChar::isUWhiteSpace() Function The IntlChar::isUWhiteSpace() function is an inbuilt function in PHP which is used to check whether the given input character is a WhiteSpace Unicode character or not. IntlChar accesses a number utility function and used to access the information about Unicode Characters. Syntax: bool IntlChar::isUW 2 min read PHP | DOMElement getElementsByTagName() Function The DOMElement::getElementsByTagName() function is an inbuilt function in PHP which is used to get the elements by tagname. Syntax: DOMNodeList DOMElement::getElementsByTagName( string $name ) Parameters: This function accepts a single parameter $name which holds the tag name or use * for getting a 2 min read PHP | DOMElement getElementsByTagNameNS() Function The DOMElement::getElementsByTagNameNS() function is an inbuilt function in PHP which is used to get all the descendant elements with a given localName and namespaceURI. Syntax: DOMNodeList DOMElement::getElementsByTagNameNS( string $namespaceURI, string $localName ) Parameters: This function accept 2 min read Like