note 101744 added to language.constants
| From: | www dot sanjaal dot com at osu1 dot php dot net | Date: | Sat, 08 Jan 2011 18:27:18 +0000 |
| Subject: | note 101744 added to language.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175541@lists.php.net to get a copy of this message | ||
How can I get a defined constant's value by using its corresponding string name?
For example, CURLOPT_REFERER is a meaningful defined constant in PHP. My script intakes this name as
string.
[code]
$name = 'CURLOPT_REFERER';
[/code]
Now, my concern is to receive the value of CURLOPT_REFERER as integer/long into some other variable
by using $name input. How is this possible?
----
Server IP: 69.147.83.197
Probable Submitter: 113.199.202.76
----
Manual Page -- http://www.php.net/manual/en/language.constants.php
Edit -- https://master.php.net/note/edit/101744
Del: integrated -- https://master.php.net/note/delete/101744/integrated
Del: useless -- https://master.php.net/note/delete/101744/useless
Del: bad code -- https://master.php.net/note/delete/101744/bad+code
Del: spam -- https://master.php.net/note/delete/101744/spam
Del: non-english -- https://master.php.net/note/delete/101744/non-english
Del: in docs -- https://master.php.net/note/delete/101744/in+docs
Del: other reasons-- https://master.php.net/note/delete/101744
Reject -- https://master.php.net/note/reject/101744
Search -- https://master.php.net/manage/user-notes.php