protected static function remove_node($node) {
		if (
			!is_a($node, 'DOMElement') &&
			!is_a($node, 'DOMNode')
		) {
			return false;
		}

		try {
			// @codingStandardsIgnoreStart
			$node->parentNode->removeChild($node);
			// @codingStandardsIgnoreEnd
			return true;
		} catch (\Throwable $e) {
			error_log($e->getMessage());
			return false;
		} catch (\Exception $e) {
			return false;
		}

		return false;
	}
protected static function remove_node($node) {
		if (
			!is_a($node, 'DOMElement') &&
			!is_a($node, 'DOMNode')
		) {
			return false;
		}

		try {
			// @codingStandardsIgnoreStart
			$node->parentNode->removeChild($node);
			// @codingStandardsIgnoreEnd
			return true;
		} catch (\Throwable $e) {
			error_log($e->getMessage());
			return false;
		} catch (\Exception $e) {
			return false;
		}

		return false;
	}
protected static function remove_node ( $ node ) { if ( ! is_a ( $ node , 'DOMElement' ) && ! is_a ( $ node , 'DOMNode' ) ) { return false ; } try { // @codingStandardsIgnoreStart $ node -> parentNode -> removeChild ( $ node ) ; // @codingStandardsIgnoreEnd return true ; } catch ( \ Throwable $ e ) { error_log ( $ e -> getMessage ( ) ) ; return false ; } catch ( \ Exception $ e ) { return false ; } return false ; }
Remove node from a DOMDocument

@param DOMElement $node Node.
@return bool True/False.
Remove node from a DOMDocument