On 18/09/15 16:35, Rowan Collins wrote:
>> exists() has a place in SOME coding
>> styles which does not require to find the 'NULL' some other way to avoid
>> the potential notice!
> 
> exists() would not be a way of avoiding the notice. exists() would be a
> way of distinguishing an extra state, quite separate from null.
> 
> If what you want to write is "if ( ! exists($foo) || is_null($foo) ) {
> ... }" then that is exactly what "if ( isset($foo) )" will give you,
> without any notices whatsoever.

NO what I want is

if ( exists($foo) ) {
  is_null($foo) { build uninitialised field }
  else { build initialise with ($foo) }
}

isset($foo) only allows { build initialise with ($foo) }
and the NULL state is missed with no way of detecting it cleanly if the
$foo does in fact not exist.

-- 
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