note 101745 added to language.constants
| From: | www dot sanjaal dot com at osu1 dot php dot net | Date: | Sat, 08 Jan 2011 18:28:17 +0000 |
| Subject: | note 101745 added to language.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175542@lists.php.net to get a copy of this message | ||
Looks there is not a way to convert a string name into defined constant.
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.
----
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/101745
Del: integrated -- https://master.php.net/note/delete/101745/integrated
Del: useless -- https://master.php.net/note/delete/101745/useless
Del: bad code -- https://master.php.net/note/delete/101745/bad+code
Del: spam -- https://master.php.net/note/delete/101745/spam
Del: non-english -- https://master.php.net/note/delete/101745/non-english
Del: in docs -- https://master.php.net/note/delete/101745/in+docs
Del: other reasons-- https://master.php.net/note/delete/101745
Reject -- https://master.php.net/note/reject/101745
Search -- https://master.php.net/manage/user-notes.php