From be0a936d2efe5cff53fad818edc8cf982a740b28 Mon Sep 17 00:00:00 2001 From: Damien Seguy Date: Thu, 6 May 2004 15:25:58 +0000 Subject: [PATCH] cosmetics and examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@158098 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/get-declared-classes.xml | 27 +++++++++++++++- .../classobj/functions/get-object-vars.xml | 5 ++- .../classobj/functions/method-exists.xml | 23 ++++++++++++- reference/misc/functions/get-browser.xml | 4 +-- reference/misc/functions/highlight-file.xml | 4 +-- reference/misc/functions/highlight-string.xml | 25 ++++++++++++++- reference/misc/functions/pack.xml | 6 +++- reference/misc/functions/usleep.xml | 32 ++++++++++++++++++- 8 files changed, 114 insertions(+), 12 deletions(-) diff --git a/reference/classobj/functions/get-declared-classes.xml b/reference/classobj/functions/get-declared-classes.xml index af7e297132..87a43a58ae 100644 --- a/reference/classobj/functions/get-declared-classes.xml +++ b/reference/classobj/functions/get-declared-classes.xml @@ -1,5 +1,5 @@ - + @@ -35,6 +35,31 @@ the appendices. + + + <function>get_declared_classes</function> example + + +]]> + + + This script will output something close to : + + + stdClass + [1] => __PHP_Incomplete_Class + [2] => Directory +) +]]> + + + See also class_exists. diff --git a/reference/classobj/functions/get-object-vars.xml b/reference/classobj/functions/get-object-vars.xml index 73da403af2..bcf4638ee4 100644 --- a/reference/classobj/functions/get-object-vars.xml +++ b/reference/classobj/functions/get-object-vars.xml @@ -1,5 +1,5 @@ - + @@ -21,8 +21,7 @@ In versions prior to PHP 4.2.0, if the variables declared in the class of which the obj is an instance, have not been assigned a value, those will not be returned in the array. In versions - after PHP 4.2.0, the key will be assigned with a NULL - value. + after PHP 4.2.0, the key will be assigned with a &null; value. diff --git a/reference/classobj/functions/method-exists.xml b/reference/classobj/functions/method-exists.xml index 52ed9ba6a6..c11ef0f9d4 100644 --- a/reference/classobj/functions/method-exists.xml +++ b/reference/classobj/functions/method-exists.xml @@ -1,5 +1,5 @@ - + @@ -18,6 +18,27 @@ method_name has been defined for the given object, &false; otherwise. + + + <function>method_exists</function> example + + +]]> + + + This script will output : + + + + + + diff --git a/reference/misc/functions/get-browser.xml b/reference/misc/functions/get-browser.xml index 02cc0d38d3..c5b4847dbf 100644 --- a/reference/misc/functions/get-browser.xml +++ b/reference/misc/functions/get-browser.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,7 @@ get_browser attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini - file. By default, the value of HTTP_USER_AGENT is + file. By default, the value of $_SERVER["HTTP_USER_AGENT"] is used; however, you can alter this (i.e., look up another browser's info) by passing the optional user_agent parameter to diff --git a/reference/misc/functions/highlight-file.xml b/reference/misc/functions/highlight-file.xml index 610798a259..94b1d3e334 100644 --- a/reference/misc/functions/highlight-file.xml +++ b/reference/misc/functions/highlight-file.xml @@ -1,5 +1,5 @@ - + @@ -70,7 +70,7 @@ ]]> - And then make a file named "source" and put it in your + And then make a file named source and put it in your web root directory. diff --git a/reference/misc/functions/highlight-string.xml b/reference/misc/functions/highlight-string.xml index c2a07c4304..95befbc3a0 100644 --- a/reference/misc/functions/highlight-string.xml +++ b/reference/misc/functions/highlight-string.xml @@ -1,5 +1,5 @@ - + @@ -25,6 +25,29 @@ not set to &true; then highlight_string will return &true; on success, &false; on failure. + + + <function>highlight_string</function> example + +'); +?> +]]> + + + This script will output: + + + +<?php phpinfo(); ?> + + +]]> + + + The return parameter became available in PHP diff --git a/reference/misc/functions/pack.xml b/reference/misc/functions/pack.xml index 64c34ff89f..0a711f2940 100644 --- a/reference/misc/functions/pack.xml +++ b/reference/misc/functions/pack.xml @@ -1,5 +1,5 @@ - + @@ -95,6 +95,10 @@ $binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66); integer value too large to be stored that way it is converted to a float which often yields an undesired result. + + See also + unpack. + + @@ -17,6 +17,36 @@ for the given number of micro_seconds. A microsecond is one millionth of a second. + + + Exemple avec <function>sleep</function> + + +]]> + + + This script will output : + + + + + + This function did not work on Windows systems until PHP 5.0.0