Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:11038
Return-Path:
Mailing-List: contact internals-help@lists.php.net; run by ezmlm
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 19636 invoked by uid 1010); 9 Jul 2004 19:07:54 -0000
Delivered-To: ezmlm-scan-internals@lists.php.net
Delivered-To: ezmlm-internals@lists.php.net
Received: (qmail 19532 invoked from network); 9 Jul 2004 19:07:54 -0000
Received: from unknown (HELO web25102.mail.ukl.yahoo.com) (217.12.10.50)
by pb1.pair.com with SMTP; 9 Jul 2004 19:07:54 -0000
Message-ID: <20040709190753.87430.qmail@web25102.mail.ukl.yahoo.com>
Received: from [217.155.198.153] by web25102.mail.ukl.yahoo.com via HTTP; Fri, 09 Jul 2004 20:07:53 BST
Date: Fri, 9 Jul 2004 20:07:53 +0100 (BST)
To: internals@lists.php.net
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Subject: Re: [PHP-DEV] what happened to that new isset() like language
From: cysgwr_eryri@yahoo.co.uk (=?iso-8859-1?q?Cris=20H?=)
Isn't this problem solvable with just a "User Space" function?
$variable exists.
');
}
else{
$tmp = $alternate;
echo('no $variable here.
');
}
return $tmp;
}
// no errors thrown ...
$nonexistent = ifsetor($nonexistent);
ifsetor($randomNonexistent);
if($nonexistent !== NULL)
echo('$nonexistent is NOT NULL
');
else
echo('$nonexistent is NULL
');
?>
Because, as Derick Rethans mentioned, arguments passed by
reference will not trigger the Undefined (variable | index)
Notice at the point of the function call, and also PHP's C++
style default arguments providing the alternate value, surely
the above code would suffice?
Apologies if I've completely misunderstood (with certainty a
non-zero probability)...
Regards,
Cris
___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com