note 76783 deleted from language.constants by danbrown

From: Date: Fri, 12 Jun 2009 22:18:30 +0000
Subject: note 76783 deleted from language.constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156825@lists.php.net to get a copy of this message
Note Submitter: Sinured ---- Ah, I forgot to point that out in my previous note: > "Constants may only evaluate to scalar values." Currently, resources are "abstract datatypes based on integers". Though this may change in the future, and is_scalar() rejects resources as non-scalar, you can define resource constants, like <?php define('DB', mysql_connect());?> (think of STDIN, STDOUT and STDERR). Resource constants will still remain resources; try var_dump().

« previous php.notes (#156825) next »