5
scroach
6y

And you guys are complaining about javascript being weird...

Comments
  • 0
    I'm not defending PHP, but I'm almost sure there is some documentation explaining this behaviour. And no, JavaScript is not weird if you use it in a sane manner.
  • 1
    @kamen might be but it's definitely not what you expect it to return. Regardless of positive or negative I expect a diff to be the same in both directions XD
  • 1
    @gintko Nope its the same if i clone each and every object. This would be even WORSE if php would modify my dates if I do a simple diff...
  • 1
    @scroach Maybe it's just that PHP conveniently assumes for you that you can't travel back in time, only forward. Makes perfect sense.

    /s
  • 0
    Why not use Carbon?
Add Comment