diff --git a/appendices/reserved.xml b/appendices/reserved.xml index ffb152a084..717ebe7d93 100755 --- a/appendices/reserved.xml +++ b/appendices/reserved.xml @@ -1,5 +1,5 @@ - + List of Reserved Words @@ -273,7 +273,8 @@ goto (PHP 6 only) - + + __DIR__ (as of PHP 5.3) diff --git a/appendices/tokens.xml b/appendices/tokens.xml index adfe991872..23bb9c0c9b 100644 --- a/appendices/tokens.xml +++ b/appendices/tokens.xml @@ -1,5 +1,5 @@ - + List of Parser Tokens @@ -100,7 +100,7 @@ T_CLASS_C __CLASS__ - constants + magic constants (available since PHP 4.3.0) @@ -165,6 +165,12 @@ default switch + + T_DIR + __DIR__ + magic constants (available + since PHP 5.3.0) + T_DIV_EQUAL /= @@ -296,7 +302,7 @@ T_FILE __FILE__ - constants + magic constants T_FINAL @@ -322,7 +328,7 @@ T_FUNC_C __FUNCTION__ - constants + magic constants (available since PHP 4.3.0) @@ -424,7 +430,7 @@ T_LINE __LINE__ - constants + magic constants T_LIST @@ -455,7 +461,7 @@ T_METHOD_C __METHOD__ - constants + magic constants (available since PHP 5.0.0) diff --git a/language/constants.xml b/language/constants.xml index 52050ef4e0..40be0304a8 100644 --- a/language/constants.xml +++ b/language/constants.xml @@ -1,5 +1,5 @@ - + Constants @@ -201,6 +201,16 @@ echo Constant; // outputs "Constant" and issues a notice. under some circumstances. + + __DIR__ + + The directory of the file. If used inside an include, + the directory of the included file is returned. This is equivalent + to dirname(__FILE__). This directory name + does not have a trailing slash unless it is the root directory. + (Added in PHP 5.3.0.) + + __FUNCTION__