SommaireTelecharger la documentationChapitre suivantChapitre precedent  

  .: News :.: Edito :.: Scripts :.: Forum :.: Erreurs :.: Jobs :. 
 
Sommaire

Options PHP et informations

assert
assert-options
extension_loaded
dl
getenv
get_cfg_var
get_current_user
get_defined_constants
get_extension_funcs
getmygid
get_included_files
get_loaded_extensions
get_required_files
get_magic_quotes_gpc
get_magic_quotes_runtime
getlastmod
getmyinode
getmypid
getmyuid
getrusage
ini_alter
ini_get
ini_get_all
ini_restore
ini_set
phpcredits
phpinfo
phpversion
php_logo_guid
php_sapi_name
php_uname
putenv
set_magic_quotes_runtime
set_time_limit
zend_logo_guid
version_compare
zend_version

6.76.8 get_defined_constants

[ Exemples avec get_defined_constants ]   PHP 4 >= 4.0.7RC1

Description

array get_defined_constants(void)

get_defined_constants retourne les noms et valeurs des constantes déjà définies. Cela inclut les constantes créées par les extensions, et celles créées avec la fonction define.

Par exemple :

<?php
  print_r
(get_defined_constants());
?>
affichera

Array
(
    [E_ERROR] => 1
    [E_WARNING] => 2
    [E_PARSE] => 4
    [E_NOTICE] => 8
    [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_ALL] => 2047
    [TRUE] => 1
)

Voir aussi get_loaded_extensions.


Chapitre précédentChapitre suivantAccueil nexen.net