note 90027 added to function.constant
| From: | richard at devarea dot nl | Date: | Thu, 02 Apr 2009 10:56:56 +0000 |
| Subject: | note 90027 added to function.constant | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152743@lists.php.net to get a copy of this message | ||
@cory dot mawhorter @ ephective dot com:
I would say the function below is a tad shorter and faster.
<?php
function consttrue($const) {
return defined($const) && constant($const);
}
?>
----
Server IP: 83.137.20.135
Probable Submitter: 195.73.25.37
----
Manual Page -- http://www.php.net/manual/en/function.constant.php
Edit -- https://master.php.net/note/edit/90027
Del: integrated -- https://master.php.net/note/delete/90027/integrated
Del: useless -- https://master.php.net/note/delete/90027/useless
Del: bad code -- https://master.php.net/note/delete/90027/bad+code
Del: spam -- https://master.php.net/note/delete/90027/spam
Del: non-english -- https://master.php.net/note/delete/90027/non-english
Del: in docs -- https://master.php.net/note/delete/90027/in+docs
Del: other reasons-- https://master.php.net/note/delete/90027
Reject -- https://master.php.net/note/reject/90027
Search -- https://master.php.net/manage/user-notes.php