$xml = simplexml_load_string('<div>123 <br /> 456</div>');
$xml->xpath('//div/text()[1]')
$dom = new DOMDocument;
$dom->loadXML('<div>123 <br /> 456</div>');
$xpath = new DOMXPath($dom);
foreach ($xpath->query('//div/text()') as $textNode) {
echo trim($textNode->nodeValue), PHP_EOL;
}
ideone.com/FYkZwX