Re: get all defined constants?

From: Date: Mon, 21 May 2001 12:01:42 +0000
Subject: Re: get all defined constants?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-53699@lists.php.net to get a copy of this message
Hmm...SID is a constant, and when it's set it is present in $GLOBALS. But when I run this: <?php define("CON1", "Hi there!"); echo CON1; print_r($GLOBALS); ?> ...the constant exists, but is not present in $GLOBALS. Weird...anyone know why this happens? (I'm using 4.0.5) Plutarck "Alex Black" <enigma@turingstudio.com> wrote in message news:B72DA53D.A257%enigma@turingstudio.com... > > phpinfo() allways has a list of variables. but of course every variable is > > allways in $GLOBALS too. > > including constants? > > I just print_r'd globals to refresh my memory, and found what I was > expecting: none of my constants. > > ? > > _alex > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#53699) next »