note 105740 deleted from language.constants.syntax by danbrown
| From: | danbrown@php.net | Date: | Tue, 13 Sep 2011 00:40:48 +0000 |
| Subject: | note 105740 deleted from language.constants.syntax by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183124@lists.php.net to get a copy of this message | ||
Note Submitter: jeferson_khard at hotmail dot com
Reason: non-english
----
Obtendo constantes definidas do php! | Getting constant set of php!
<?php
define("MINHA_DEFINE", "definido por mim");
define("MY_DEFINE", "set by me");
$constant = get_defined_constants(); //Array | lista de constantes definidas | list of defined
constants
foreach($constant as $const => $v)
{
echo $const." - ".$v."<br />";
}
?>
SaÃda no Browser! output in the browser
E_ERROR - 1
E_RECOVERABLE_ERROR - 4096
E_WARNING - 2
E_PARSE - 4
E_NOTICE - 8
E_STRICT - 2048
E_DEPRECATED - 8192
E_CORE_ERROR - 16
E_CORE_WARNING - 32
E_COMPILE_ERROR - 64
E_COMPILE_WARNING - 128
E_USER_ERROR - 256
E_USER_WARNING - 512
E_USER_NOTICE - 1024
E_USER_DEPRECATED - 16384
E_ALL - 30719
TRUE - 1
FALSE -
NULL -
ZEND_THREAD_SAFE - 1
ZEND_DEBUG_BUILD -
PHP_VERSION - 5.3.5
PHP_MAJOR_VERSION - 5
PHP_MINOR_VERSION - 3
PHP_RELEASE_VERSION - 5
PHP_EXTRA_VERSION -
PHP_VERSION_ID - 50305
PHP_ZTS - 1
PHP_DEBUG - 0
...
MINHA_DEFINE - Definido por mim
MY_DEFINE - set by me