From dfa559fbf44d726be5b6a7239bec57ed93cf7319 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Wed, 6 Apr 2005 15:26:37 +0000 Subject: [PATCH] Fix PHP Version Switch more files to the new layout git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183766 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/var/functions/get-defined-vars.xml | 4 +- reference/var/functions/get-resource-type.xml | 46 ++++++-- reference/var/functions/is-resource.xml | 47 ++++++-- reference/var/functions/is-scalar.xml | 101 ++++++++++++------ reference/var/functions/var-dump.xml | 41 +++++-- reference/var/functions/var-export.xml | 67 +++++++++--- 6 files changed, 232 insertions(+), 74 deletions(-) diff --git a/reference/var/functions/get-defined-vars.xml b/reference/var/functions/get-defined-vars.xml index f5ab619468..24cc8d3a57 100644 --- a/reference/var/functions/get-defined-vars.xml +++ b/reference/var/functions/get-defined-vars.xml @@ -1,5 +1,5 @@ - + get_defined_vars @@ -72,7 +72,7 @@ print_r(array_keys(get_defined_vars())); - 5 + 5.0.0 The $GLOBALS variable is included in the results of the array returned. diff --git a/reference/var/functions/get-resource-type.xml b/reference/var/functions/get-resource-type.xml index c1e1a213fe..9f4756f9fe 100644 --- a/reference/var/functions/get-resource-type.xml +++ b/reference/var/functions/get-resource-type.xml @@ -1,5 +1,5 @@ - + @@ -8,19 +8,49 @@ Returns the resource type - - Description + + &reftitle.description; stringget_resource_type resourcehandle - This function returns a string representing the type of the - resource passed to it. If the parameter is not a valid - resource, it generates an error. + This function gets the type of the given resource. + + + + &reftitle.parameters; + + + + handle + + + The evaluated resource handle. + + + + + + + + &reftitle.returnvalues; + + If the given handle is a resource, this function + will return a string representing its type. If the type is not identified + by this function, the return value will be the string + Unknown. - + This function will return &false; and generate an error if + handle is not a resource. + + + + &reftitle.examples; + + + <function>get_resource_type</function> example doc) . "\n"; ?> ]]> - + diff --git a/reference/var/functions/is-resource.xml b/reference/var/functions/is-resource.xml index 61166c76d8..ae4eb1787e 100644 --- a/reference/var/functions/is-resource.xml +++ b/reference/var/functions/is-resource.xml @@ -1,5 +1,5 @@ - + @@ -8,17 +8,40 @@ Finds whether a variable is a resource - - Description + + &reftitle.description; boolis_resource mixedvar - is_resource returns &true; if the variable - given by the var parameter is a - resource, otherwise it returns &false;. + Finds whether the given variable is a resource. + + + &reftitle.parameters; + + + + var + + + The variable being evaluated. + + + + + + + + &reftitle.returnvalues; + + Returns &true; if var is a resource, + &false; otherwise. + + + + &reftitle.examples; using <function>is_resource</function> @@ -36,11 +59,15 @@ if (!is_resource($db_link)) { + + + &reftitle.seealso; - See the documentation on the resource-type for - more information, and - get_resource_type. - + + The resource-type documentation + get_resource_type + + diff --git a/reference/var/functions/is-scalar.xml b/reference/var/functions/is-scalar.xml index 6c558c1d7e..fef3ac5635 100644 --- a/reference/var/functions/is-scalar.xml +++ b/reference/var/functions/is-scalar.xml @@ -1,5 +1,5 @@ - + @@ -15,16 +15,50 @@ mixedvar - is_scalar returns &true; if the variable - given by the var parameter is a scalar, - otherwise it returns &false;. + Finds whether the given variable is a scalar. Scalar variables are those containing an integer, float, string or boolean. Types array, object and resource are not scalar. - + + + + is_scalar does not consider resource + type values to be scalar as resources are abstract datatypes + which are currently based on integers. This implementation detail should + not be relied upon, as it may change. + + + + + &reftitle.parameters; + + + + var + + + The variable being evaluated. + + + + + + + + &reftitle.returnvalues; + + Returns &true; if var is a scalar &false; + otherwise. + + + + &reftitle.examples; + + + <function>is_scalar</function> example @@ -42,40 +76,41 @@ $pi = 3.1416; $proteins = array("hemoglobin", "cytochrome c oxidase", "ferredoxin"); show_var($pi); -// prints: 3.1416 - show_var($proteins) -// prints: -// array(3) { -// [0]=> -// string(10) "hemoglobin" -// [1]=> -// string(20) "cytochrome c oxidase" -// [2]=> -// string(10) "ferredoxin" -// } + ?> ]]> - + &example.outputs; + + + string(10) "hemoglobin" + [1]=> + string(20) "cytochrome c oxidase" + [2]=> + string(10) "ferredoxin" +} +]]> + + - - - is_scalar does not consider resource - type values to be scalar as resources are abstract datatypes - which are currently based on integers. This implementation detail should - not be relied upon, as it may change. - - + + + &reftitle.seealso; - See also is_bool, - is_numeric, - is_float, - is_int, - is_real, - is_string, - is_object, and - is_array. + + is_float + is_int + is_numeric + is_real + is_string + is_bool + is_object + is_array + diff --git a/reference/var/functions/var-dump.xml b/reference/var/functions/var-dump.xml index d2f345909e..1bcc33c6e6 100644 --- a/reference/var/functions/var-dump.xml +++ b/reference/var/functions/var-dump.xml @@ -1,5 +1,5 @@ - + @@ -24,13 +24,37 @@ returned in the output. &tip.ob-capture; + + + &reftitle.parameters; + + + + expression + + + The variable you want to export. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.examples; <function>var_dump</function> example ]]> @@ -75,10 +99,15 @@ bool(true) - - See also var_export and - print_r. - + + + &reftitle.seealso; + + + var_export + print_r + + diff --git a/reference/var/functions/var-export.xml b/reference/var/functions/var-export.xml index e5c8b8d21d..b52315f390 100644 --- a/reference/var/functions/var-export.xml +++ b/reference/var/functions/var-export.xml @@ -1,29 +1,61 @@ - + var_export Outputs or returns a parsable string representation of a variable - - Description + + &reftitle.description; mixedvar_export mixedexpression boolreturn - This function returns structured information about the variable that is - passed to this function. It is similar to var_dump + var_export gets structured information about the + given variable. It is similar to var_dump with one exception: the returned representation is valid PHP code. - - You can also return the variable representation by using &true; as - second parameter to this function. - + + + &reftitle.parameters; - + + + expression + + + The variable you want to export. + + + + + return + + + If used and set to &true;, var_export will return + the variable representation instead of outputing it. + + + + + + + + &reftitle.returnvalues; + + Returns the variable representation when the return + parameter is used and evaluates to &true;. Otherwise, this function will + return &null;. + + + + &reftitle.examples; + + + <function>var_export</function> Examples - + - - See also var_dump and - print_r. - + + + &reftitle.seealso; + + + var_dump + print_r + +