New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeImmutable not json_encoded by HHVM #5137

Open
nyamsprod opened this Issue Apr 7, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@nyamsprod

nyamsprod commented Apr 7, 2015

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

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

This comment has been minimized.

Show comment
Hide comment
@fredemmott

fredemmott May 4, 2015

Contributor

reverting, should extend ObjectData::toArray instead

Contributor

fredemmott commented May 4, 2015

reverting, should extend ObjectData::toArray instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment