The test did not fail in normal php when it actually should have, it was hhvm catching the difference between the 2 objects. I think hhvm had a better behavior than php here.