php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31593 DOMXPath::evaluate() undefined.
Submitted: 2005-01-18 09:53 UTC Modified: 2005-01-18 11:54 UTC
From: vsokolov at gmail dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.0.3 OS: WinXP
Private report: No CVE-ID: None
 [2005-01-18 09:53 UTC] vsokolov at gmail dot com
Description:
------------
DOMXPath::evaluate() is reported as undefined though there are no notes in the manual about it being unavailable in any builds. The other DOMXPath methods specified in the manual work as expected.

Reproduce code:
---------------
define(NS, "VMP");
...
$this->definition = DomDocument::load("contracts/{$this->driver}.xml");
$this->xpath = new DOMXPath($this->definition);
$this->xpath->registerNamespace('vmp', NS);
$this->name = $this->xpath->evaluate('/vmp:contract-definition/@name');
-----------------------------------
<vmp:contract-definition name="Dummy contract" xmlns:vmp="VMP" />


Actual result:
--------------
Fatal error:  Call to undefined method DOMXPath::evaluate()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-18 11:54 UTC] chregu@php.net
It will only be available in PHP 5.1
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC