On 26/05/2016 21:40, Lester Caine wrote:
// accessing $me->marriage or $me->death returns NULL (because they
>allow nulls) but raises E_NOTICE
BUT DateTime currently will not store 'null' - it returns 'now' instead.
We end up having to store string or integer values because we can't
store a null date :(


That's exactly what ?DateTime is for - "either DateTime or Null", just like in a database.

In most type systems, there is no such thing as "a null date" - if it's null, it's not a date, it's a null value.

Regards,

--
Rowan Collins
[IMSoP]


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to