note 111515 added to function.get-defined-constants
| From: | bimal at sanjaal dot com | Date: | Thu, 28 Feb 2013 09:10:35 +0000 |
| Subject: | note 111515 added to function.get-defined-constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193744@lists.php.net to get a copy of this message | ||
Though the syntax editors mark the following as error, it executes successfully under PHP, as you
desire.
<?php
$user_defined_constants=get_defined_constants(true)['user'];
print_r($user_defined_constants);
?>
No errors/warnings seen.
Only the special thing here is, you are passing true to the function, and extracting the
result's 'user' index directly.
----
Server IP: 69.147.83.199
Probable Submitter: 202.166.221.1
----
Manual Page -- http://php.net/manual/en/function.get-defined-constants.php
Edit -- https://master.php.net/note/edit/111515
Del: integrated -- https://master.php.net/note/delete/111515/integrated
Del: useless -- https://master.php.net/note/delete/111515/useless
Del: bad code -- https://master.php.net/note/delete/111515/bad+code
Del: spam -- https://master.php.net/note/delete/111515/spam
Del: non-english -- https://master.php.net/note/delete/111515/non-english
Del: in docs -- https://master.php.net/note/delete/111515/in+docs
Del: other reasons-- https://master.php.net/note/delete/111515
Reject -- https://master.php.net/note/reject/111515
Search -- https://master.php.net/manage/user-notes.php