From 8e97792cf06d05ba3ca9fbc0f5e6b25cd426b2a7 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 2 Jun 2007 19:28:01 +0000 Subject: [PATCH] Switch to new doc style (tm) # anyone for a make test ? git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236869 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/import-request-variables.xml | 173 +++++++++------- reference/var/functions/is-callable.xml | 152 +++++++++----- reference/var/functions/settype.xml | 188 +++++++++++------- 3 files changed, 314 insertions(+), 199 deletions(-) diff --git a/reference/var/functions/import-request-variables.xml b/reference/var/functions/import-request-variables.xml index 82e21f574e..c084386fc3 100644 --- a/reference/var/functions/import-request-variables.xml +++ b/reference/var/functions/import-request-variables.xml @@ -1,80 +1,117 @@ - - - - - import_request_variables - Import GET/POST/Cookie variables into the global scope - - - Description - - boolimport_request_variables - stringtypes - stringprefix - - - Imports GET/POST/Cookie variables into the global scope. It is - useful if you disabled - register_globals, - but would like to see some variables in the global scope. - - - Using the types parameter, you can - specify which request variables to import. You can use - 'G', 'P' and 'C' characters respectively for GET, POST and - Cookie. These characters are not case sensitive, so you - can also use any combination of 'g', 'p' and 'c'. POST - includes the POST uploaded file information. Note that the - order of the letters matters, as when using "gp", the POST - variables will overwrite GET variables with the same - name. Any other letters than GPC are discarded. - - - The prefix parameter is used as a variable - name prefix, prepended before all variable's name imported into the - global scope. So if you have a GET value named "userid", and provide - a prefix "pref_", then you'll get a global variable named - $pref_userid. - - - If you're interested in importing other variables - into the global scope, such as SERVER, consider using - extract. - - - - Although the prefix parameter is - optional, you will get an - E_NOTICE level error if - you specify no prefix, or specify an empty string as a - prefix. This is a possible security hazard. Notice - level errors are not displayed using the default - error reporting - level. - - - - + + + + import_request_variables + Import GET/POST/Cookie variables into the global scope + + + + &reftitle.description; + + boolimport_request_variables + stringtypes + stringprefix + + + Imports GET/POST/Cookie variables into the global scope. It is useful if + you disabled register_globals, + but would like to see some variables in the global scope. + + + If you're interested in importing other variables into the global scope, + such as SERVER, consider using extract. + + + + + &reftitle.parameters; + + + + types + + + Using the types parameter, you can specify + which request variables to import. You can use 'G', 'P' and 'C' + characters respectively for GET, POST and Cookie. These characters are + not case sensitive, so you can also use any combination of 'g', 'p' + and 'c'. POST includes the POST uploaded file information. + + + + Note that the order of the letters matters, as when using "gp", the + POST variables will overwrite GET variables with the same name. Any + other letters than GPC are discarded. + + + + + + prefix + + + Variable name prefix, prepended before all variable's name imported + into the global scope. So if you have a GET value named "userid", and + provide a prefix "pref_", then you'll get a global variable named + $pref_userid. + + + + Although the prefix parameter is optional, you + will get an E_NOTICE level + error if you specify no prefix, or specify an empty string as a + prefix. This is a possible security hazard. Notice level errors are + not displayed using the default error reporting level. + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>import_request_variables</function> example + ]]> - - - - See also $_REQUEST, - register_globals, - Predefined Variables, - and extract. - - - + + + + + + + &reftitle.seealso; + + + $_REQUEST + register_globals + Predefined Variables + extract + + + + + - - - - is_callable - - Verify that the contents of a variable can be called as a function - - - - Description - - boolis_callable - mixedvar - boolsyntax_only - stringcallable_name - - - Verify that the contents of a variable can be called as a function. - This can check that a simple variable contains the name of a valid - function, or that an array contains a properly encoded object and - function name. - - - The var parameter can be either the name of a function stored in - a string variable, or an object and the name of a method within the - object, like this: - array($SomeObject, 'MethodName') - - - If the syntax_only argument is &true; the - function only verifies that var might be a - function or method. It will only reject simple variables that are - not strings, or an array that does not have a valid structure to be - used as a callback. The valid ones are supposed to have only 2 - entries, the first of which is an object or a string, and the - second a string. - - - The callable_name argument receives the - "callable name". In the example below it's - "someClass:someMethod". Note, however, that despite the - implication that someClass::SomeMethod() is a callable static - method, this is not the case. - - - + + + + is_callable + + Verify that the contents of a variable can be called as a function + + + + + &reftitle.description; + + boolis_callable + mixedvar + boolsyntax_only + stringcallable_name + + + Verify that the contents of a variable can be called as a function. + This can check that a simple variable contains the name of a valid + function, or that an array contains a properly encoded object and + function name. + + + + + &reftitle.parameters; + + + + var + + + Can be either the name of a function stored in a string variable, or + an object and the name of a method within the object, like this: + array($SomeObject, 'MethodName') + + + + + syntax_only + + + If set to &true; the function only verifies that + var might be a function or method. It will only + reject simple variables that are not strings, or an array that does + not have a valid structure to be used as a callback. The valid ones + are supposed to have only 2 entries, the first of which is an object + or a string, and the second a string. + + + + + callable_name + + + Receives the "callable name". In the example below it is + "someClass:someMethod". Note, however, that despite the implication + that someClass::SomeMethod() is a callable static method, this is not + the case. + + + + + + + + + &reftitle.returnvalues; + + Returns &true; if var is callable, &false; + otherwise. + + + + + &reftitle.examples; + + + <function>is_callable</function> example + ]]> - - - - See also function_exists and - method_exists. - - - + + + + + + + &reftitle.seealso; + + + function_exists + method_exists + + + + + - - - - settype - Set the type of a variable - - - Description - - boolsettype - mixedvar - stringtype - - - Set the type of variable var to - type. - - - Possibles values of type are: - - - - "boolean" (or, since PHP 4.2.0, "bool") - - - - - "integer" (or, since PHP 4.2.0, "int") - - - - - "float" (only possible since PHP 4.2.0, for older versions use the - deprecated variant "double") - - - - - "string" - - - - - "array" - - - - - "object" - - - - - "null" (since PHP 4.2.0) - - - - - - &return.success; - - - - <function>settype</function> example - + + + + settype + Set the type of a variable + + + + &reftitle.description; + + boolsettype + mixedvar + stringtype + + + Set the type of variable var to + type. + + + + + &reftitle.parameters; + + + + var + + + The variable being converted. + + + + + type + + + Possibles values of type are: + + + + "boolean" (or, since PHP 4.2.0, "bool") + + + + + "integer" (or, since PHP 4.2.0, "int") + + + + + "float" (only possible since PHP 4.2.0, for older versions use the + deprecated variant "double") + + + + + "string" + + + + + "array" + + + + + "object" + + + + + "null" (since PHP 4.2.0) + + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>settype</function> example + ]]> - - - - - See also gettype, - type-casting and - type-juggling. - - - + + + + + + + &reftitle.seealso; + + + gettype + type-casting + type-juggling + + + + +