src/SimpleDOM.php
public function getNode($strName, $varDefault = false)
    {
        $varResult = $this->$strName;

        if (($varResult !== false) && ((string)$varResult !== '')) {
            // Get first element
            return (string)$varResult;
        } else {
            return $varDefault;
        }
    }
public function getNode($strName, $varDefault = false)
    {
        $varResult = $this->$strName;

        if (($varResult !== false) && ((string)$varResult !== '')) {
            // Get first element
            return (string)$varResult;
        } else {
            return $varDefault;
        }
    }
Get an node by name

@param string $strName
@param bool $varDefault
@return bool|string