- array_pop: documentation ( source)
<?php
$xml = <<<XML
<?xml version='1.0'?>
<always>
<be><![CDATA[always be testing!]]></be>
</always>
XML;
$sml = new SimpleXMLElement ($xml);
$result = $sml->xpath('/always/be');
echo (string) array_pop($result);