Re: defined() function broke?

From: Date: Fri, 06 Oct 2000 11:03:37 +0000
Subject: Re: defined() function broke?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18856@lists.php.net to get a copy of this message
At Fri, 06 Oct 2000 10:37:41 +0100, Andy Warwick <andy.w@unit5.co.uk> wrote: > > I'm having problems with using the defined() function to check if a constant > is defined. > > The following program: > > <?php > echo "FOO defined: ".defined(FOO)."<br>Value: ".FOO; > define("FOO", "snafu"); > echo "<br><br>FOO defined: ".defined(FOO)."<br>Value: > ".FOO; The paramater of defined() is name of constant as string. In this case, 'defined("FOO")' is correct. -- koyama@hoge.org koyama@beatraft.com KOYAMA Tetsuji BeatCraft, Inc., Tokyo, Japan.

« previous php.general (#18856) next »