|
SimpleXMLElement::currentReturns the current element Description
public SimpleXMLElement SimpleXMLElement::current()
Warning
Prior to PHP 8.0, SimpleXMLElement::current was only declared on the subclass SimpleXMLIterator. This method returns the current element as a SimpleXMLElement object. ParametersThis function has no parameters. Return ValuesReturns the current element as a SimpleXMLElement object. Errors/ExceptionsThrows an Error on failure. Changelog
Examples
Example #1 Return the current element The above example will output:
object(SimpleXMLElement)#2 (1) {
[0]=>
string(10) "PHP basics"
}
See Also
|