facebook / facebook/hhvm

msg_* functions do not work with binary strings

Open
#4,365 1 comment 0 reactions 0 assignees View on GitHub
low-pri php5 incompatibility
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

Test case:

``` php
$q = msg_get_queue(123456);
msg_send($q, 1, "a\x00b\xF0");
msg_receive($q, 1, $msgtype, 100, $msg);

for ($i = 0, $len = strlen($msg); $i < $len; $i++) {
echo ord($msg[$i]), "\n";
}
```

PHP output:

```
97
0
98
240
```

HHVM output:

```
Warning: Message corrupted in ...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.