note 76783 added to language.constants

From: Date: Mon, 30 Jul 2007 18:39:25 +0000
Subject: note 76783 added to language.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-129054@lists.php.net to get a copy of this message
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(). ---- Server IP: 217.13.201.10 Probable Submitter: 172.179.100.132 ---- Manual Page -- http://www.php.net/manual/en/language.constants.php Edit -- https://master.php.net/note/edit/76783 Del: integrated -- https://master.php.net/note/delete/76783/integrated Del: useless -- https://master.php.net/note/delete/76783/useless Del: bad code -- https://master.php.net/note/delete/76783/bad+code Del: spam -- https://master.php.net/note/delete/76783/spam Del: non-english -- https://master.php.net/note/delete/76783/non-english Del: in docs -- https://master.php.net/note/delete/76783/in+docs Del: other reasons-- https://master.php.net/note/delete/76783 Reject -- https://master.php.net/note/reject/76783 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129054) next »