`
isiqi
  • 浏览: 16496277 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

PHP Predefined Constants

阅读更多

<?php

// *nix

echo DIRECTORY_SEPARATOR; // /

echo PHP_SHLIB_SUFFIX; // so

echo PATH_SEPARATOR; // :


// Win*

echo DIRECTORY_SEPARATOR; // \

echo PHP_SHLIB_SUFFIX; // dll

echo PATH_SEPARATOR; // ;

?>

Predefined Constants

Core Predefined Constants

These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.

PHP_VERSION (string)
PHP_MAJOR_VERSION (integer)
Available since PHP 5.2.7.
PHP_MINOR_VERSION (integer)
Available since PHP 5.2.7.
PHP_RELEASE_VERSION (integer)
Available since PHP 5.2.7.
PHP_VERSION_ID (integer)
Available since PHP 5.2.7.
PHP_EXTRA_VERSION (string)
Available since PHP 5.2.7.
PHP_ZTS (integer)
Available since PHP 5.2.7.
PHP_DEBUG (integer)
Available since PHP 5.2.7.
PHP_MAXPATHLEN (integer)
Available since PHP 5.3.0.
PHP_OS (string)
PHP_SAPI (string)
Available since PHP 4.2.0. See also php_sapi_name().
PHP_EOL (string)
Available since PHP 4.3.10 and PHP 5.0.2
PHP_INT_MAX (integer)
Available since PHP 4.4.0 and PHP 5.0.5
PHP_INT_SIZE (integer)
Available since PHP 4.4.0 and PHP 5.0.5
DEFAULT_INCLUDE_PATH (string)
PEAR_INSTALL_DIR (string)
PEAR_EXTENSION_DIR (string)
PHP_EXTENSION_DIR (string)
PHP_PREFIX (string)
Available since PHP 4.3.0
PHP_BINDIR (string)
PHP_LIBDIR (string)
PHP_DATADIR (string)
PHP_SYSCONFDIR (string)
PHP_LOCALSTATEDIR (string)
PHP_CONFIG_FILE_PATH (string)
PHP_CONFIG_FILE_SCAN_DIR (string)
PHP_SHLIB_SUFFIX (string)
Available since PHP 4.3.0
PHP_OUTPUT_HANDLER_START (integer)
PHP_OUTPUT_HANDLER_CONT (integer)
PHP_OUTPUT_HANDLER_END (integer)
PHP_WINDOWS_VERSION_MAJOR (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_MINOR (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_BUILD (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_PLATFORM (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_SP_MAJOR (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_SP_MINOR (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_SUITEMASK (integer)
Available since PHP 5.3.0
PHP_WINDOWS_VERSION_PRODUCTTYPE (integer)
Available since PHP 5.3.0
PHP_WINDOWS_NT_DOMAIN_CONTROLLER (integer)
Available since PHP 5.3.0
PHP_WINDOWS_NT_SERVER (integer)
Available since PHP 5.3.0
PHP_WINDOWS_NT_WORKSTATION (integer)
Available since PHP 5.3.0
E_ERROR (integer)
E_WARNING (integer)
E_PARSE (integer)
E_NOTICE (integer)
E_CORE_ERROR (integer)
E_CORE_WARNING (integer)
E_COMPILE_ERROR (integer)
E_COMPILE_WARNING (integer)
E_USER_ERROR (integer)
E_USER_WARNING (integer)
E_USER_NOTICE (integer)
E_DEPRECATED (integer)
Available since PHP 5.3.0
E_USER_DEPRECATED (integer)
Available since PHP 5.3.0
E_ALL (integer)
E_STRICT (integer)
Available since PHP 5.0.0
__COMPILER_HALT_OFFSET__ (integer)
Available since PHP 5.1.0
TRUE (boolean)
See Booleans.
FALSE (boolean)
See Booleans.
NULL (boolean)
See Null.

See also: Magic constants.

Standard Predefined Constants

These constants are defined in PHP by default.

EXTR_OVERWRITE (integer)
EXTR_SKIP (integer)
EXTR_PREFIX_SAME (integer)
EXTR_PREFIX_ALL (integer)
EXTR_PREFIX_INVALID (integer)
EXTR_PREFIX_IF_EXISTS (integer)
EXTR_IF_EXISTS (integer)
SORT_ASC (integer)
SORT_DESC (integer)
SORT_REGULAR (integer)
SORT_NUMERIC (integer)
SORT_STRING (integer)
CASE_LOWER (integer)
CASE_UPPER (integer)
COUNT_NORMAL (integer)
COUNT_RECURSIVE (integer)
ASSERT_ACTIVE (integer)
ASSERT_CALLBACK (integer)
ASSERT_BAIL (integer)
ASSERT_WARNING (integer)
ASSERT_QUIET_EVAL (integer)
CONNECTION_ABORTED (integer)
CONNECTION_NORMAL (integer)
CONNECTION_TIMEOUT (integer)
INI_USER (integer)
INI_PERDIR (integer)
INI_SYSTEM (integer)
INI_ALL (integer)
M_E (float)
M_LOG2E (float)
M_LOG10E (float)
M_LN2 (float)
M_LN10 (float)
M_PI (float)
M_PI_2 (float)
M_PI_4 (float)
M_1_PI (float)
M_2_PI (float)
M_2_SQRTPI (float)
M_SQRT2 (float)
M_SQRT1_2 (float)
CRYPT_SALT_LENGTH (integer)
CRYPT_STD_DES (integer)
CRYPT_EXT_DES (integer)
CRYPT_MD5 (integer)
CRYPT_BLOWFISH (integer)
DIRECTORY_SEPARATOR (string)
SEEK_SET (integer)
SEEK_CUR (integer)
SEEK_END (integer)
LOCK_SH (integer)
LOCK_EX (integer)
LOCK_UN (integer)
LOCK_NB (integer)
HTML_SPECIALCHARS (integer)
HTML_ENTITIES (integer)
ENT_COMPAT (integer)
ENT_QUOTES (integer)
ENT_NOQUOTES (integer)
INFO_GENERAL (integer)
INFO_CREDITS (integer)
INFO_CONFIGURATION (integer)
INFO_MODULES (integer)
INFO_ENVIRONMENT (integer)
INFO_VARIABLES (integer)
INFO_LICENSE (integer)
INFO_ALL (integer)
CREDITS_GROUP (integer)
CREDITS_GENERAL (integer)
CREDITS_SAPI (integer)
CREDITS_MODULES (integer)
CREDITS_DOCS (integer)
CREDITS_FULLPAGE (integer)
CREDITS_QA (integer)
CREDITS_ALL (integer)
STR_PAD_LEFT (integer)
STR_PAD_RIGHT (integer)
STR_PAD_BOTH (integer)
PATHINFO_DIRNAME (integer)
PATHINFO_BASENAME (integer)
PATHINFO_EXTENSION (integer)
PATH_SEPARATOR (string)
CHAR_MAX (integer)
LC_CTYPE (integer)
LC_NUMERIC (integer)
LC_TIME (integer)
LC_COLLATE (integer)
LC_MONETARY (integer)
LC_ALL (integer)
LC_MESSAGES (integer)
ABDAY_1 (integer)
ABDAY_2 (integer)
ABDAY_3 (integer)
ABDAY_4 (integer)
ABDAY_5 (integer)
ABDAY_6 (integer)
ABDAY_7 (integer)
DAY_1 (integer)
DAY_2 (integer)
DAY_3 (integer)
DAY_4 (integer)
DAY_5 (integer)
DAY_6 (integer)
DAY_7 (integer)
ABMON_1 (integer)
ABMON_2 (integer)
ABMON_3 (integer)
ABMON_4 (integer)
ABMON_5 (integer)
ABMON_6 (integer)
ABMON_7 (integer)
ABMON_8 (integer)
ABMON_9 (integer)
ABMON_10 (integer)
ABMON_11 (integer)
ABMON_12 (integer)
MON_1 (integer)
MON_2 (integer)
MON_3 (integer)
MON_4 (integer)
MON_5 (integer)
MON_6 (integer)
MON_7 (integer)
MON_8 (integer)
MON_9 (integer)
MON_10 (integer)
MON_11 (integer)
MON_12 (integer)
AM_STR (integer)
PM_STR (integer)
D_T_FMT (integer)
D_FMT (integer)
T_FMT (integer)
T_FMT_AMPM (integer)
ERA (integer)
ERA_YEAR (integer)
ERA_D_T_FMT (integer)
ERA_D_FMT (integer)
ERA_T_FMT (integer)
ALT_DIGITS (integer)
INT_CURR_SYMBOL (integer)
CURRENCY_SYMBOL (integer)
CRNCYSTR (integer)
MON_DECIMAL_POINT (integer)
MON_THOUSANDS_SEP (integer)
MON_GROUPING (integer)
POSITIVE_SIGN (integer)
NEGATIVE_SIGN (integer)
INT_FRAC_DIGITS (integer)
FRAC_DIGITS (integer)
P_CS_PRECEDES (integer)
P_SEP_BY_SPACE (integer)
N_CS_PRECEDES (integer)
N_SEP_BY_SPACE (integer)
P_SIGN_POSN (integer)
N_SIGN_POSN (integer)
DECIMAL_POINT (integer)
RADIXCHAR (integer)
THOUSANDS_SEP (integer)
THOUSEP (integer)
GROUPING (integer)
YESEXPR (integer)
NOEXPR (integer)
YESSTR (integer)
NOSTR (integer)
CODESET (integer)
LOG_EMERG (integer)
LOG_ALERT (integer)
LOG_CRIT (integer)
LOG_ERR (integer)
LOG_WARNING (integer)
LOG_NOTICE (integer)
LOG_INFO (integer)
LOG_DEBUG (integer)
LOG_KERN (integer)
LOG_USER (integer)
LOG_MAIL (integer)
LOG_DAEMON (integer)
LOG_AUTH (integer)
LOG_SYSLOG (integer)
LOG_LPR (integer)
LOG_NEWS (integer)
LOG_UUCP (integer)
LOG_CRON (integer)
LOG_AUTHPRIV (integer)
LOG_LOCAL0 (integer)
LOG_LOCAL1 (integer)
LOG_LOCAL2 (integer)
LOG_LOCAL3 (integer)
LOG_LOCAL4 (integer)
LOG_LOCAL5 (integer)
LOG_LOCAL6 (integer)
LOG_LOCAL7 (integer)
LOG_PID (integer)
LOG_CONS (integer)
LOG_ODELAY (integer)
LOG_NDELAY (integer)
LOG_NOWAIT (integer)
LOG_PERROR (integer)
分享到:
评论

相关推荐

    kalkules_1_7_4

    工程用的計算機軟體 Some of the Kalkules key features: ...inserting some of the predefined constants + ability to define your own constants inteligent percentage calculations and much more...

    php英文开发文档

    •Constants •Expressions •Operators •Control Structures •Functions •Classes and Objects •Namespaces •Exceptions •Generators •References Explained •Predefined Variables •Predefined ...

    php_manual_zh最新中文版20090215

    Predefined Exceptions Predefined Interfaces Context options and parameters 安全 简介 总则 以 CGI 模式安装时 以 Apache 模块安装时 文件系统安全 数据库安全 错误报告 使用 Register Globals 用户提交的数据 ...

    PHP手册中文版php_manual CHM版 2009年

    PHP 手册 by: Mehdi Achour Friedhelm Betz Antony Dovgal Nuno Lopes Hannes Magnusson Georg Richter ...Predefined Exceptions Predefined Interfaces Context options and parameters ...... ''''''

    php_manual_zh-PHP中文手册(2010-08-16).part1.rar

    Predefined Interfaces Context options and parameters 安全 简介 总则 以 CGI 模式安装时 以 Apache 模块安装时 文件系统安全 数据库安全 错误报告 使用 Register Globals 用户提交的数据 魔术引号 隐藏 PHP 保持...

    php_manual_zh-PHP中文手册(2010-08-16).part2.rar

    Predefined Interfaces Context options and parameters 安全 简介 总则 以 CGI 模式安装时 以 Apache 模块安装时 文件系统安全 数据库安全 错误报告 使用 Register Globals 用户提交的数据 魔术引号 隐藏 PHP 保持...

    php.ini-development

    A number of predefined registry keys on Windows (As of PHP 5.2.0) ; 4. Current working directory (except CLI) ; 5. The web server's directory (for SAPI modules), or directory of PHP ; (otherwise in ...

    Perl Predefined Variables.pdf

    Perl预定义变量是Perl语言中一些具有特殊用途的内置变量。它们由Perl解释器自动管理,且大多数是全局性的,这意味着它们在程序的任何地方都是可见的。下面详细介绍一下这些预定义变量以及它们的作用: ...

    predefined_maven_properties

    预定义的Maven属性列表 此列表源自Codehaus的Wiki页面( ),不幸的是,此页面随着Codehaus的关闭而消失了 注意:在Maven 3.0中,所有pom。*属性均已弃用。 使用project。*代替! 内置属性 ${project.basedir}表示...

    print-predefined-macros.md

    # 打印gcc预定义的宏信息 ## 例子 [root@linux:~]$ gcc -dM -E - &lt; /dev/null

    图片标注工具

    图片标注工具,支持windows下直接运行,压缩包内包括labelImg.exe程序和预定义的类别名称predefined_classes.txt文档。 使用说明:先在predefined_classes.txt内 按行输入所有标注的类别名称,然后运行labelImg.exe...

    caprice:简单易用的php模板引擎

    :candy: 简单易用的php模板引擎 :candy: :fire: 介绍 : Caprice是PHP模板引擎,旨在与HTML代码一起编写简洁PHP语法。 caprice编译语法并生成php文件,这意味着没有性能损失,但... // load caprice predefined direc

    epv:PHP的额外预定义变量

    重新启动httpd或php-fpm用法您将获得两个Extra Predefined Variables:$ _PUT和$ _DELETE 当$ _SERVER ['REQUEST_METHOD']为PUT时,将预定义$ _PUT $ _SERVER ['REQUEST_METHOD']为DELETE时将预定义$ _DELETE $ _PUT...

    AUTOSAR_TR_PredefinedNames.pdf

    《AUTOSAR 预定义名称》文档详细解读 AUTOSAR(AUTomotive Open System ARchitecture,汽车开放系统架构)是一个全球汽车行业合作组织,致力于制定和推广用于汽车电子和软件系统的标准化平台。...

    Ruby Pocket Reference

    #### Predefined Variables and Constants - **Predefined Variables:** Ruby defines several predefined variables that hold important values, such as `$0` for the name of the current program, `$!` for ...

    iOS Fuondation Framework Reference

    **Constants**: Constants related to affine transformations, such as predefined transformations. --- ##### NSAppleEventDescriptorClassReference **Overview**: `NSAppleEventDescriptor` is a class that...

    cgi简明教程(入门基础)

    在早期的Web开发中,CGI是动态网页的主要实现方式,虽然现在已经被更高效的脚本语言如PHP、Python和Ruby等替代,但理解CGI的工作原理对于Web开发者来说仍然是有益的。 ### CGI工作流程 1. **用户请求**:当用户通过...

    Sketch-Predefined-Pages:快速向您的Sketch文档添加一定数量的预定义页面

    草图插件:预定义页面 快速向您的Sketch文档中添加一定数量的预定义/用户定义页面。 默认页面(可以更改) :skull: RIP ...双击Predefined-Pages.sketchplugin进行安装 感谢DesignerNews上的提出的建议/想法。

    Inside C.pdf

    #### 预定义常量(Predefined constants) 预定义常量是由编译器或库提供的特殊值,如NULL等。 #### 枚举常量(Enumeration constants) 枚举常量是通过`enum`关键字定义的一组命名常量。 ### 变量(VARIABLES) ...

Global site tag (gtag.js) - Google Analytics