On 01/09/15 10:29, Craig Francis wrote:
> Personally I still like the idea of an exists(), because I feel that is how 
> many programmers treat and use the isset() function - simply because they do 
> use NULL as a valid value, and either haven't read the manual, or forget the 
> exception that is mentioned on line 1 (something I've done a couple of times).
> 
> Although I realise it will take many years before anyone can start using it.

For those of us starting from a base of SQL data, NULL has always been
'not set' and so a binary field can have three values 'yes', 'no' and
'don't know' so when that data is transferred into PHP it has always
been natural to maintain that distinction so NULL === not set.

That this data exists in an array in PHP is a natural development, but
the object orientated/class approach would be that the data is loaded
into an object and the values in that object are no longer considered as
array elements, but discrete variables with all the overheads of getters
and setters, so an 'isset' to check if the value HAS been converted from
NULL to a live value is what is NOW the preferred style of working?
While the older style of working would simply directly read the elements
of the array?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

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

Reply via email to