facebook / facebook/hhvm

Zend incompatibility: xml_set_element_handler() behaves differently

オープン
#1,391 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る
external low-pri php5 incompatibility
主要言語
C++
スター
18.7k
フォーク
3.1k
平均マージ
1時間 47分
マージ済み PR(30日)
2

説明

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
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。