(PHP 4, PHP 5, PHP 7, PHP 8)
xml_set_processing_instruction_handler — Set up processing instruction (PI) handler
Sets the processing instruction (PI) handler function for the XML parser
parser
.
A processing instruction has the following format:
<?target data ?>
PHP code is delimited by the <?php
processing instruction.
As such it is possible to have PHP code within an XML document.
However, the PI end tag (?>
) must not be part of
the data.
If a PI end tag exists as part of the embedded PHP code,
the rest of the PHP code and the "real" PI end tag, will be treated
as character data.
parser
O analisador XML.
handler
Se null
ou uma string vazia for passada, o manipulador será redefinido para seu estado padrão.
Se handler
for um callable,
o callable será definido como o manipulador.
Se handler
for uma string,
ela pode ser o nome de um método de um objet definido com
xml_set_object().
The signature of the handler must be:
parser
target
data
Sempre retorna true
.