1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/simplexml/simplexml.stub.php
Niels Dossche efa1fafc2f Partially fix GH-16317: SimpleXML does not allow __debugInfo() overrides to work
If only we did not have the pseudo-key "@attributes", we could've just
removed the custom get_debug_info implementation and this would work out
of the box. Anyway, we just have to manually check for an override now.

Closes GH-20131.
2025-10-12 11:24:45 +02:00

84 lines
2.9 KiB
PHP

<?php
/** @generate-class-entries */
function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
/** @not-serializable */
class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
{
/** @tentative-return-type */
public function xpath(string $expression): array|null|false {}
/** @tentative-return-type */
public function registerXPathNamespace(string $prefix, string $namespace): bool {}
/** @tentative-return-type */
public function asXML(?string $filename = null): string|bool {}
/**
* @tentative-return-type
* @alias SimpleXMLElement::asXML
*/
public function saveXML(?string $filename = null): string|bool {}
/** @tentative-return-type */
public function getNamespaces(bool $recursive = false): array {}
/** @tentative-return-type */
public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true): array|false {}
/** @tentative-return-type */
public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement {}
/** @tentative-return-type */
public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement {}
public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}
/** @tentative-return-type */
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement {}
/** @tentative-return-type */
public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void {}
/** @tentative-return-type */
public function getName(): string {}
public function __toString(): string {}
public function __debugInfo(): ?array {}
/** @tentative-return-type */
public function count(): int {}
/** @tentative-return-type */
public function rewind(): void {}
/** @tentative-return-type */
public function valid(): bool {}
/** @tentative-return-type */
public function current(): SimpleXMLElement {}
/** @tentative-return-type */
public function key(): string {}
/** @tentative-return-type */
public function next(): void {}
/** @tentative-return-type */
public function hasChildren(): bool {}
/** @tentative-return-type */
public function getChildren(): ?SimpleXMLElement {}
}
class SimpleXMLIterator extends SimpleXMLElement
{
}