php / php/doc-en

Contradiction in xml_set_default_handler() docs

Open
#1,391 4 comments 0 reactions 1 assignee View on GitHub

@Girgias is already working on this.

Since Sep 13, 2022.

Extension: libxml
Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

From manual page: https://php.net/function.xml-set-default-handler

It says:

Description
xml_set_default_handler(XMLParser $parser, callable $handler): bool

Ok so $handler is a callable. We all know what a callable is: either a string which is the name of a function, an [$object, 'methodName'] pair, or an anonymous function definition.

But then it says:

handler
handler is a string containing the name of a function that must exist when xml_parse() is called for parser.

Wait, so must it be a string? Or is this just a leftover from an older version when callables didn't exist and it actually had to be a string with a function name?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.