facebook / facebook/hhvm

DateTimeImmutable not json_encoded by HHVM

Open
#5,137 2 comments 2 reactions 0 assignees View on GitHub
php5 incompatibility
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

http://3v4l.org/ragDN
`DateTime` is json_encoded but not `DateTimeImmutable`

``` php
//works
echo json_encode(new DateTime('2015-05-03'));
//does not work returns empty brackets
echo json_encode(new DateTimeImmutable('2015-05-03')); //{}
```

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.