Doc #80494 [Com]: DOMElement::remove not documented
Edit report at https://bugs.php.net/bug.php?id=80494&edit=1
ID: 80494
Comment by: beberlei@php.net
Reported by: contact at perryrylance dot com
Summary: DOMElement::remove not documented
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows 10
PHP Version: 8.0.0
Block user comment: N
Private report: N
New Comment:
Sorry, I am having a bad day, the problem is not the parameters, but that the PHP 8 api has
"void" as return type, so my last attempt, this time its right :-)
public function remove(): void;
As a side-note, PHP 8 now contains so called stubs, that show the right signature directly in PHP
code. See the DOM Extension and remove here: https://github.com/php/php-src/blob/master/ext/dom/php_dom.stub.php#L231
Previous Comments:
------------------------------------------------------------------------
[2020-12-08 11:28:26] beberlei@php.net
I am sorry, i meant:
public function remove();
------------------------------------------------------------------------
[2020-12-08 11:28:00] beberlei@php.net
Right, this was part of the DOM Living Standard RFC https://wiki.php.net/rfc/dom_living_standard_api
I haven't gotten around to the documentation part yet :-( The signature is without paraemters:
public function delete();
------------------------------------------------------------------------
[2020-12-08 11:19:12] contact at perryrylance dot com
Description:
------------
I have a library which extends DOMElement.
My library adds DOMElement::remove for convenience.
After installing PHP 8 my library creates a fatal error.
The function definition I have for ExampleElement::remove does not match DOMElement::remove.
Not a biggie - I can simply change the function definition to match, *however*, the PHP manual does
not document this function.
Test script:
---------------
<?php
class ExampleElement extends DOMElement
{
public function remove()
{
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80494&edit=1
Thread (9 messages)