On 5/27/2016 7:48 PM, Rowan Collins wrote: > On 27 May 2016 11:25:48 GMT+01:00, Fleshgrinder <p...@fleshgrinder.com> wrote: >> if (isset($row['d'])) { >> $o->d = new DateTime($row['d']); >> } >> >> No need to assign null since it already is null by default and the >> nullable hint will not result in any errors upon accessing it. > > Actually, that's one of the points up for discussion: should accessing the > property when no assignment has been made raise an E_NOTICE, so that there is > a difference between "?int $foo" and "?int $foo = null". > > Regards, >
True, I forgot and I am in favor of E_NOTICE. This was actually part of my super confusing long example. -- Richard "Fleshgrinder" Fussenegger
signature.asc
Description: OpenPGP digital signature