Doc #78526 [Opn->Nab]: Bad return value signature of SimpleXMLElement::xpath

From: Date: Wed, 11 Sep 2019 17:05:53 +0000
Subject: Doc #78526 [Opn->Nab]: Bad return value signature of SimpleXMLElement::xpath
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16938@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78526&edit=1 ID: 78526 Updated by: cmb@php.net Reported by: yann dot rabiller at gmail dot com Summary: Bad return value signature of SimpleXMLElement::xpath -Status: Open +Status: Not a bug Type: Documentation Problem Package: SimpleXML related PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > This means an array is necessarily returned from the method. No, see <https://www.php.net/manual/en/functions.internal.php>. Previous Comments: ------------------------------------------------------------------------ [2019-09-11 11:40:28] yann dot rabiller at gmail dot com Description: ------------ --- From manual page: https://php.net/simplexmlelement.xpath --- The signature of the xpath method as given in the documentation is: public SimpleXMLElement::xpath ( string $path ) : array This means an array is necessarily returned from the method. On the other hand, when reading the return values in the same page, I see: > Returns an array of SimpleXMLElement objects or FALSE in case of an error. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78526&edit=1

« previous php.doc.bugs (#16938) next »