Zend incompatibility: xml_set_element_handler() behaves differently
- Lenguaje dominante
- C++
- Estrellas
- 18.7k
- Forks
- 3.1k
- Merge medio
- 1 h 47 min
- PR fusionados (30 d)
- 2
Descripción
To reproduce, use the following script (e.g. xml_parse.php):
``` php
";
}
function end_elem($parser,$name)
{
echo "";
}
$parser=xml_parser_create();
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
xml_set_element_handler($parser,"start_elem","end_elem");
$buf = '';
echo xml_parse($parser,$buf,strlen($buf)==0);
```
then compare
``` bash
php xml_parse.php
```
Output: `1`
with
``` bash
hhvm --mode debug xml_parse.php
```
Run with r.
Output: `1`
It seems that start_elem() is somehow not called in the Zend implementation (maybe a bug there or is this intended?).
```
php --version
PHP 5.4.4-14+deb7u7 (cli) (built: Dec 12 2013 08:42:07)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.0, Copyright (c) 2005-2012, by mOo
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.