Changed all identifiers between <function> and/or <refname> tags

that had ONLY the first letter uppercase to all-lowercase


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50055 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jeroen van Wolffelaar 2001-06-23 20:10:52 +00:00
parent df2d9807a2
commit 7c62d81304
42 changed files with 362 additions and 362 deletions

View file

@ -5,13 +5,13 @@
The HTTP Authentication hooks in PHP are only available when it is
running as an Apache module and is hence not available in the CGI version.
In an Apache module PHP script, it is possible to use the
<function>Header</function> function to send an "Authentication Required"
<function>header</function> function to send an "Authentication Required"
message to the client browser causing it to pop up a Username/Password
input window. Once the user has filled in a username and a password,
the URL containing the PHP script will be called again with the variables,
$PHP_AUTH_USER, $PHP_AUTH_PW and $PHP_AUTH_TYPE set to the user
name, password and authentication type respectively. Only "Basic"
authentication is supported at this point. See the <function>Header</function>
authentication is supported at this point. See the <function>header</function>
function for more information.</simpara>
<para>

View file

@ -49,7 +49,7 @@
</para>
<note>
<simpara>
<function>Apache_lookup_uri</function> only works when PHP
<function>apache_lookup_uri</function> only works when PHP
is installed as an Apache module.
</simpara>
</note>
@ -75,7 +75,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Apache_note</function> is an Apache-specific function
<function>apache_note</function> is an Apache-specific function
which gets and sets values in a request's
<literal>notes</literal> table. If called with one argument, it
returns the current value of note
@ -183,7 +183,7 @@ while (list ($header, $value) = each ($headers)) {
request.
<note>
<simpara>
<function>Getallheaders</function> is currently only supported
<function>getallheaders</function> is currently only supported
when PHP runs as an <productname>Apache</productname> module.
</simpara>
</note>
@ -205,7 +205,7 @@ while (list ($header, $value) = each ($headers)) {
</funcprototype>
</funcsynopsis>
<para>
<function>Virtual</function> is an Apache-specific function which
<function>virtual</function> is an Apache-specific function which
is equivalent to &lt;!--#include virtual...--&gt; in mod_include.
It performs an Apache sub-request. It is useful for including
CGI scripts or .shtml files, or anything else that you would

View file

@ -49,7 +49,7 @@
<para>
<note>
<para>
<function>Array</function> is a language construct used to
<function>array</function> is a language construct used to
represent literal arrays, and not a regular function.
</para>
</note>
@ -68,7 +68,7 @@
arrays, and how to skip-and-continue numeric indices in normal
arrays.
<example>
<title><function>Array</function> example</title>
<title><function>array</function> example</title>
<programlisting role="php">
$fruits = array (
"fruits" =&gt; array ("a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple"),
@ -80,7 +80,7 @@ $fruits = array (
</para>
<para>
<example>
<title>Automatic index with <function>Array</function></title>
<title>Automatic index with <function>array</function></title>
<programlisting role="php">
$array = array( 1, 1, 1, 1, 1, 8=>1, 4=>1, 19, 3=>13);
print_r($array);
@ -108,7 +108,7 @@ Array
<para>
This example creates a 1-based array.
<example>
<title>1-based index with <function>Array</function></title>
<title>1-based index with <function>array</function></title>
<programlisting role="php">
$firstquarter = array(1 => 'January', 'February', 'March');
print_r($firstquarter);
@ -146,13 +146,13 @@ Array
</funcprototype>
</funcsynopsis>
<para>
<function>Array_count_values</function> returns an array using
<function>array_count_values</function> returns an array using
the values of the <parameter>input</parameter> array as keys and
their frequency in <parameter>input</parameter> as values.
</para>
<para>
<example>
<title><function>Array_count_values</function> example</title>
<title><function>array_count_values</function> example</title>
<programlisting role="php">
$array = array (1, "hello", 1, "world", "hello");
array_count_values ($array); // returns array (1=&gt;2, "hello"=&gt;2, "world"=&gt;1)
@ -180,14 +180,14 @@ array_count_values ($array); // returns array (1=&gt;2, "hello"=&gt;2, "world"=&
</funcprototype>
</funcsynopsis>
<para>
<function>Array_diff</function> returns an array
<function>array_diff</function> returns an array
containing all the values of <parameter>array1</parameter>
that are not present in any of the other arguments.
Note that keys are preserved.
</para>
<para>
<example>
<title><function>Array_diff</function> example</title>
<title><function>array_diff</function> example</title>
<programlisting role="php">
$array1 = array ("a" =&gt; "green", "red", "blue", "red");
$array2 = array ("b" =&gt; "green", "yellow", "red");
@ -223,7 +223,7 @@ $result = array_diff ($array1, $array2);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_filter</function> returns an array
<function>array_filter</function> returns an array
containing all the elements of <parameter>input</parameter>
filtered according a callback function. If the
<parameter>input</parameter> is an associative array
@ -231,7 +231,7 @@ $result = array_diff ($array1, $array2);
</para>
<para>
<example>
<title><function>Array_filter</function> example</title>
<title><function>array_filter</function> example</title>
<programlisting role="php">
function odd($var) {
return ($var % 2 == 1);
@ -293,7 +293,7 @@ $even_arr = array_filter($array2, "even");
</para>
<para>
<example>
<title><function>Array_flip</function> example</title>
<title><function>array_flip</function> example</title>
<programlisting role="php">
$trans = array_flip ($trans);
$original = strtr ($str, $trans);
@ -302,7 +302,7 @@ $original = strtr ($str, $trans);
</para>
<para>
<example>
<title><function>Array_flip</function> example : collision</title>
<title><function>array_flip</function> example : collision</title>
<programlisting role="php">
$trans = array ("a" => 1, "b" => 1, "c" => 2);
$trans = array_flip ($trans);
@ -331,14 +331,14 @@ $trans = array_flip ($trans);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_intersect</function> returns an array
<function>array_intersect</function> returns an array
containing all the values of <parameter>array1</parameter>
that are present in all the arguments.
Note that keys are preserved.
</para>
<para>
<example>
<title><function>Array_intersect</function> example</title>
<title><function>array_intersect</function> example</title>
<programlisting role="php">
$array1 = array ("a" =&gt; "green", "red", "blue");
$array2 = array ("b" =&gt; "green", "yellow", "red");
@ -375,7 +375,7 @@ $result = array_intersect ($array1, $array2);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_keys</function> returns the keys, numeric and
<function>array_keys</function> returns the keys, numeric and
string, from the <parameter>input</parameter> array.
</para>
<para>
@ -385,7 +385,7 @@ $result = array_intersect ($array1, $array2);
</para>
<para>
<example>
<title><function>Array_keys</function> example</title>
<title><function>array_keys</function> example</title>
<programlisting role="php">
$array = array (0 =&gt; 100, "color" =&gt; "red");
array_keys ($array); // returns array (0, "color")
@ -445,7 +445,7 @@ function array_keys ($arr, $term="") {
</funcprototype>
</funcsynopsis>
<para>
<function>Array_map</function> returns an array
<function>array_map</function> returns an array
containing all the elements of <parameter>arr1</parameter>
after applying the callback function to each one.
The number of parameters that the callback function accepts should
@ -453,7 +453,7 @@ function array_keys ($arr, $term="") {
</para>
<para>
<example>
<title><function>Array_map</function> example</title>
<title><function>array_map</function> example</title>
<programlisting role="php">
function cube($n) {
return $n*$n*$n;
@ -470,7 +470,7 @@ $b = array_map("cube", $a);
</para>
<para>
<example>
<title><function>Array_map</function> - using more arrays</title>
<title><function>array_map</function> - using more arrays</title>
<programlisting role="php">
function show_Spanish($n, $m) {
return "The number $n is called $m in Spanish";
@ -547,7 +547,7 @@ print_r($d);
</para>
<para>
<example>
<title><function>Array_map</function> - creating an array of arrays</title>
<title><function>array_map</function> - creating an array of arrays</title>
<programlisting role="php">
$a = array(1, 2, 3, 4, 5);
$b = array("one", "two", "three", "four", "five");
@ -623,7 +623,7 @@ print_r($d);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_merge</function> merges the elements of two or
<function>array_merge</function> merges the elements of two or
more arrays together so that the values of one are appended to
the end of the previous one. It returns the resulting array.
</para>
@ -671,7 +671,7 @@ array_merge ($array1, $array2);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_merge_recursive</function> merges the elements of
<function>array_merge_recursive</function> merges the elements of
two or more arrays together so that the values of one are appended
to the end of the previous one. It returns the resulting array.
</para>
@ -685,7 +685,7 @@ array_merge ($array1, $array2);
</para>
<para>
<example>
<title><function>Array_merge_recursive</function> example</title>
<title><function>array_merge_recursive</function> example</title>
<programlisting role="php">
$ar1 = array ("color" =&gt; array ("favorite" =&gt; "red"), 5);
$ar2 = array (10, "color" =&gt; array ("favorite" =&gt; "green", "blue"));
@ -726,7 +726,7 @@ $result = array_merge_recursive ($ar1, $ar2);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_multisort</function> can be used to sort several
<function>array_multisort</function> can be used to sort several
arrays at once or a multi-dimensional array according by one of
more dimensions. It maintains key association when sorting.
</para>
@ -831,7 +831,7 @@ array_multisort ($ar[0], SORT_ASC, SORT_STRING,
</funcprototype>
</funcsynopsis>
<para>
<function>Array_pad</function> returns a copy of the
<function>array_pad</function> returns a copy of the
<parameter>input</parameter> padded to size specified by
<parameter>pad_size</parameter> with value
<parameter>pad_value</parameter>. If
@ -843,7 +843,7 @@ array_multisort ($ar[0], SORT_ASC, SORT_STRING,
</para>
<para>
<example>
<title><function>Array_pad</function> example</title>
<title><function>array_pad</function> example</title>
<programlisting role="php">
$input = array (12, 10, 9);
@ -875,7 +875,7 @@ $result = array_pad ($input, 2, "noop");
</funcprototype>
</funcsynopsis>
<para>
<function>Array_pop</function> pops and returns the last value of
<function>array_pop</function> pops and returns the last value of
the <parameter>array</parameter>, shortening the
<parameter>array</parameter> by one element.
If <parameter>array</parameter> is empty (or is not an array),
@ -883,7 +883,7 @@ $result = array_pad ($input, 2, "noop");
</para>
<para>
<example>
<title><function>Array_pop</function> example</title>
<title><function>array_pop</function> example</title>
<programlisting role="php">
$stack = array ("orange", "apple", "raspberry");
$fruit = array_pop ($stack);
@ -923,7 +923,7 @@ $fruit = array_pop ($stack);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_push</function> treats
<function>array_push</function> treats
<parameter>array</parameter> as a stack, and pushes the passed
variables onto the end of <parameter>array</parameter>. The
length of <parameter>array</parameter> increases by the number of
@ -938,7 +938,7 @@ $array[] = $var;
</para>
<para>
<example>
<title><function>Array_push</function> example</title>
<title><function>array_push</function> example</title>
<programlisting role="php">
$stack = array (1, 2);
array_push ($stack, "+", 3);
@ -976,7 +976,7 @@ array_push ($stack, "+", 3);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_rand</function> is rather useful when you want to
<function>array_rand</function> is rather useful when you want to
pick one or more random entries out of an array. It takes an
<parameter>input</parameter> array and an optional argument
<parameter>num_req</parameter> which specifies how many entries you
@ -994,7 +994,7 @@ array_push ($stack, "+", 3);
</para>
<para>
<example>
<title><function>Array_rand</function> example</title>
<title><function>array_rand</function> example</title>
<programlisting role="php">
srand ((double) microtime() * 10000000);
$input = array ("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
@ -1024,14 +1024,14 @@ print $input[$rand_keys[1]]."\n";
</funcprototype>
</funcsynopsis>
<para>
<function>Array_reverse</function> takes input
<function>array_reverse</function> takes input
<parameter>array</parameter> and returns a new array with the
order of the elements reversed, preserving the keys if
<parameter>preserve_keys</parameter> is <literal>TRUE</literal>.
</para>
<para>
<example>
<title><function>Array_reverse</function> example</title>
<title><function>array_reverse</function> example</title>
<programlisting role="php">
$input = array ("php", 4.0, array ("green", "red"));
$result = array_reverse ($input);
@ -1073,7 +1073,7 @@ $result_keyed = array_reverse ($input, TRUE);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_reduce</function> applies iteratively the
<function>array_reduce</function> applies iteratively the
<parameter>callback</parameter> function to the elements of the
array <parameter>input</parameter>, so as to reduce the array to
a single value. If the optional <parameter>intial</parameter> is
@ -1082,7 +1082,7 @@ $result_keyed = array_reverse ($input, TRUE);
</para>
<para>
<example>
<title><function>Array_reduce</function> example</title>
<title><function>array_reduce</function> example</title>
<programlisting role="php">
function rsum($v, $w) {
$v += $w;
@ -1131,7 +1131,7 @@ $d = array_reduce($x, "rsum", 1);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_shift</function> shifts the first value of the
<function>array_shift</function> shifts the first value of the
<parameter>array</parameter> off and returns it, shortening the
<parameter>array</parameter> by one element and moving everything
down.
@ -1140,7 +1140,7 @@ $d = array_reduce($x, "rsum", 1);
</para>
<para>
<example>
<title><function>Array_shift</function> example</title>
<title><function>array_shift</function> example</title>
<programlisting role="php">
$args = array ("-v", "-f");
$opt = array_shift ($args);
@ -1179,7 +1179,7 @@ $opt = array_shift ($args);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_slice</function> returns a sequence of elements
<function>array_slice</function> returns a sequence of elements
from the <parameter>array</parameter> specified by the
<parameter>offset</parameter> and <parameter>length</parameter>
parameters.
@ -1201,7 +1201,7 @@ $opt = array_shift ($args);
</para>
<para>
<example>
<title><function>Array_slice</function> examples</title>
<title><function>array_slice</function> examples</title>
<programlisting role="php">
$input = array ("a", "b", "c", "d", "e");
@ -1244,7 +1244,7 @@ $output = array_slice ($input, 0, 3); // returns "a", "b", and "c"
</funcprototype>
</funcsynopsis>
<para>
<function>Array_splice</function> removes the elements designated
<function>array_splice</function> removes the elements designated
by <parameter>offset</parameter> and
<parameter>length</parameter> from the
<parameter>input</parameter> array, and replaces them with the
@ -1298,7 +1298,7 @@ $a[$x] = $y array_splice ($input, $x, 1, $y)
</para>
<para>
<example>
<title><function>Array_splice</function> examples</title>
<title><function>array_splice</function> examples</title>
<programlisting role="php">
$input = array ("red", "green", "blue", "yellow");
array_splice ($input, 2);
@ -1341,12 +1341,12 @@ array_splice ($input, -1, 1, array("black", "maroon"));
</funcprototype>
</funcsynopsis>
<para>
<function>Array_sum</function> returns the sum of values
<function>array_sum</function> returns the sum of values
in an array as an integer or float.
</para>
<para>
<example>
<title><function>Array_sum</function> examples</title>
<title><function>array_sum</function> examples</title>
<programlisting role="php">
$a = array(2,4,6,8);
echo "sum(a) = ".array_sum($a)."\n";
@ -1375,14 +1375,14 @@ echo "sum(b) = ".array_sum($b)."\n";
</funcprototype>
</funcsynopsis>
<para>
<function>Array_unique</function> takes input
<function>array_unique</function> takes input
<parameter>array</parameter> and returns a new array
without duplicate values.
Note that keys are preserved.
</para>
<para>
<example>
<title><function>Array_unique</function> example</title>
<title><function>array_unique</function> example</title>
<programlisting role="php">
$input = array ("a" =&gt; "green", "red", "b" =&gt; "green", "blue", "red");
$result = array_unique ($input);
@ -1418,7 +1418,7 @@ $result = array_unique ($input);
</funcprototype>
</funcsynopsis>
<para>
<function>Array_unshift</function> prepends passed elements to
<function>array_unshift</function> prepends passed elements to
the front of the <parameter>array</parameter>. Note that the list
of elements is prepended as a whole, so that the prepended
elements stay in the same order.
@ -1429,7 +1429,7 @@ $result = array_unique ($input);
</para>
<para>
<example>
<title><function>Array_unshift</function> example</title>
<title><function>array_unshift</function> example</title>
<programlisting role="php">
$queue = array ("p1", "p3");
array_unshift ($queue, "p4", "p5", "p6");
@ -1467,7 +1467,7 @@ array_unshift ($queue, "p4", "p5", "p6");
</para>
<para>
<example>
<title><function>Array_values</function> example</title>
<title><function>array_values</function> example</title>
<programlisting role="php">
$array = array ("size" =&gt; "XL", "color" =&gt; "gold");
array_values ($array); // returns array ("XL", "gold")
@ -1554,7 +1554,7 @@ function array_values ($arr) {
</note>
<para>
<example>
<title><function>Array_walk</function> example</title>
<title><function>array_walk</function> example</title>
<programlisting role="php">
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
@ -1604,7 +1604,7 @@ array_walk ($fruits, 'test_print');
with. This is used mainly when sorting associative arrays where
the actual element order is significant.
<example>
<title><function>Arsort</function> example</title>
<title><function>arsort</function> example</title>
<programlisting role="php">
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
arsort ($fruits);
@ -1664,7 +1664,7 @@ fruits[c] = apple
with. This is used mainly when sorting associative arrays where
the actual element order is significant.
<example>
<title><function>Asort</function> example</title>
<title><function>asort</function> example</title>
<programlisting role="php">
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
asort ($fruits);
@ -1723,7 +1723,7 @@ fruits[a] = orange
</funcprototype>
</funcsynopsis>
<para>
<function>Compact</function> takes a variable number of
<function>compact</function> takes a variable number of
parameters. Each parameter can be either a string containing the
name of the variable, or an array of variable names. The array
can contain other arrays of variable names inside it;
@ -1742,7 +1742,7 @@ fruits[a] = orange
</para>
<para>
<example>
<title><function>Compact</function> example</title>
<title><function>compact</function> example</title>
<programlisting role="php">
$city = "San Francisco";
$state = "CA";
@ -1789,7 +1789,7 @@ $result = compact ("event", "nothing_here", $location_vars);
Returns 0 if the variable is not set or is an empty array.
<warning>
<para>
<function>Count</function> may return 0 for a variable that
<function>count</function> may return 0 for a variable that
isn't set, but it may also return 0 for a variable that has
been initialized with an empty array. Use
<function>isset</function> to test if a variable is set.
@ -1803,7 +1803,7 @@ $result = compact ("event", "nothing_here", $location_vars);
</para>
<para>
<example>
<title><function>Count</function> example</title>
<title><function>count</function> example</title>
<programlisting role="php">
$a[0] = 1;
$a[1] = 3;
@ -1909,7 +1909,7 @@ $result = count ($b);
</para>
<para>
<example>
<title><function>Each</function> examples</title>
<title><function>each</function> examples</title>
<programlisting role="php">
$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese");
$bar = each ($foo);
@ -1941,7 +1941,7 @@ $bar = each ($foo);
</example>
</para>
<para>
<function>Each</function> is typically used in conjunction with
<function>each</function> is typically used in conjunction with
<function>list</function> to traverse an array; for instance,
<varname>$HTTP_POST_VARS</varname>:
<example>
@ -1987,7 +1987,7 @@ while (list ($key, $val) = each ($HTTP_POST_VARS)) {
</funcprototype>
</funcsynopsis>
<para>
<function>End</function> advances <parameter>array</parameter>'s
<function>end</function> advances <parameter>array</parameter>'s
internal pointer to the last element, and returns that element.
</para>
<para>
@ -2107,7 +2107,7 @@ while (list ($key, $val) = each ($HTTP_POST_VARS)) {
</para>
<para>
<example>
<title><function>Extract</function> example</title>
<title><function>extract</function> example</title>
<programlisting role="php">
&lt;?php
@ -2183,7 +2183,7 @@ blue, large, sphere, medium
</para>
<para>
<example>
<title><function>In_array</function> example</title>
<title><function>in_array</function> example</title>
<programlisting role="php">
$os = array ("Mac", "NT", "Irix", "Linux");
if (in_array ("Irix", $os)){
@ -2194,7 +2194,7 @@ if (in_array ("Irix", $os)){
</para>
<para>
<example>
<title><function>In_array</function> with strict example</title>
<title><function>in_array</function> with strict example</title>
<programlisting role="php">
<?php
$a = array('1.10', 12.4, 1.13);
@ -2265,7 +2265,7 @@ if (in_array(1.13, $a, TRUE))
</funcprototype>
</funcsynopsis>
<para>
<function>Key</function> returns the index element of the
<function>key</function> returns the index element of the
current array position.
</para>
<para>
@ -2294,7 +2294,7 @@ if (in_array(1.13, $a, TRUE))
Sorts an array by key in reverse order, maintaining key to data
correlations. This is useful mainly for associative arrays.
<example>
<title><function>Krsort</function> example</title>
<title><function>krsort</function> example</title>
<programlisting role="php">
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
krsort ($fruits);
@ -2351,7 +2351,7 @@ fruits[a] = orange
Sorts an array by key, maintaining key to data correlations. This
is useful mainly for associative arrays.
<example>
<title><function>Ksort</function> example</title>
<title><function>ksort</function> example</title>
<programlisting role="php">
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
ksort ($fruits);
@ -2413,7 +2413,7 @@ fruits[d] = lemon
but a language construct. <function>list</function> is used to
assign a list of variables in one operation.
<example>
<title><function>List</function> example</title>
<title><function>list</function> example</title>
<programlisting role="php">
&lt;table>
&lt;tr>
@ -2579,7 +2579,7 @@ Array
there are no more elements.
</para>
<para>
<function>Next</function> behaves like
<function>next</function> behaves like
<function>current</function>, with one difference. It advances
the internal array pointer one place forward before returning the
element. That means it returns the next array element and
@ -2655,7 +2655,7 @@ Array
</warning>
</para>
<para>
<function>Prev</function> behaves just like
<function>prev</function> behaves just like
<function>next</function>, except it rewinds the internal array
pointer one place instead of advancing it.
</para>
@ -2683,7 +2683,7 @@ Array
</funcprototype>
</funcsynopsis>
<para>
<function>Range</function> returns an array of integers from
<function>range</function> returns an array of integers from
<parameter>low</parameter> to <parameter>high</parameter>,
inclusive.
</para>
@ -2709,11 +2709,11 @@ Array
</funcprototype>
</funcsynopsis>
<para>
<function>Reset</function> rewinds <parameter>array</parameter>'s
<function>reset</function> rewinds <parameter>array</parameter>'s
internal pointer to the first element.
</para>
<para>
<function>Reset</function> returns the value of the first array
<function>reset</function> returns the value of the first array
element.
</para>
<para>
@ -2743,7 +2743,7 @@ Array
<para>
This function sorts an array in reverse order (highest to lowest).
<example>
<title><function>Rsort</function> example</title>
<title><function>rsort</function> example</title>
<programlisting role="php">
$fruits = array ("lemon", "orange", "banana", "apple");
rsort ($fruits);
@ -2801,7 +2801,7 @@ fruits[3] = apple
an array. You must use <function>srand</function> to seed this
function.
<example>
<title><function>Shuffle</function> example</title>
<title><function>shuffle</function> example</title>
<programlisting role="php">
$numbers = range (1,20);
srand ((double)microtime()*1000000);
@ -2860,7 +2860,7 @@ while (list (, $number) = each ($numbers)) {
This function sorts an array. Elements will be arranged from
lowest to highest when this function has completed.
<example>
<title><function>Sort</function> example</title>
<title><function>sort</function> example</title>
<programlisting role="php">
&lt;?php
@ -2988,7 +2988,7 @@ fruits[3] = orange
</para>
<para>
<example>
<title><function>Uksort</function> example</title>
<title><function>uksort</function> example</title>
<programlisting role="php">
function cmp ($a, $b) {
if ($a == $b) return 0;
@ -3058,7 +3058,7 @@ while (list ($key, $value) = each ($a)) {
</para>
<para>
<example>
<title><function>Usort</function> example</title>
<title><function>usort</function> example</title>
<programlisting role="php">
function cmp ($a, $b) {
if ($a == $b) return 0;
@ -3098,7 +3098,7 @@ while (list ($key, $value) = each ($a)) {
<para>
<example>
<title>
<function>Usort</function> example using multi-dimensional array
<function>usort</function> example using multi-dimensional array
</title>
<programlisting role="php">
function cmp ($a, $b) {

View file

@ -38,12 +38,12 @@
</funcprototype>
</funcsynopsis>
<simpara>
<function>Aspell_new</function> opens up a new dictionary and
<function>aspell_new</function> opens up a new dictionary and
returns the dictionary link identifier for use in other aspell
functions.</simpara>
<para>
<example>
<title><function>Aspell_new</function></title>
<title><function>aspell_new</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");
</programlisting>
@ -67,12 +67,12 @@ $aspell_link=aspell_new ("english");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Aspell_check</function> checks the spelling of a word
<function>aspell_check</function> checks the spelling of a word
and returns true if the spelling is correct, false if not.
</simpara>
<para>
<example>
<title><function>Aspell_check</function></title>
<title><function>aspell_check</function></title>
<programlisting>
$aspell_link=aspell_new ("english");
if (aspell_check ($aspell_link, "testt")) {
@ -103,13 +103,13 @@ if (aspell_check ($aspell_link, "testt")) {
</funcprototype>
</funcsynopsis>
<simpara>
<function>Aspell_check_raw</function> checks the spelling of a
<function>aspell_check_raw</function> checks the spelling of a
word, without changing its case or trying to trim it in any way
and returns true if the spelling is correct, false if not.
</simpara>
<para>
<example>
<title><function>Aspell_check_raw</function></title>
<title><function>aspell_check_raw</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");
if (aspell_check_raw ($aspell_link, "test")) {
@ -138,12 +138,12 @@ if (aspell_check_raw ($aspell_link, "test")) {
</funcprototype>
</funcsynopsis>
<simpara>
<function>Aspell_suggest</function> returns an array of possible
<function>aspell_suggest</function> returns an array of possible
spellings for the given word.
</simpara>
<para>
<example>
<title><function>Aspell_suggest</function></title>
<title><function>aspell_suggest</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");

View file

@ -442,7 +442,7 @@ echo date ("M-d-Y", easter_date(2001)); /* "Apr-15-2001" */
which fall outside the range of UNIX timestamps (i.e. before 1970
or after 2037).
<example>
<title><function>Easter_days</function> example</title>
<title><function>easter_days</function> example</title>
<programlisting role="php">
echo easter_days (1999); /* 14, i.e. April 4 */
echo easter_days (1492); /* 32, i.e. April 22 */

View file

@ -264,7 +264,7 @@ $conn = null;
</funcprototype>
</funcsynopsis>
<para>
<function>Com_invoke</function> invokes a method of the COM
<function>com_invoke</function> invokes a method of the COM
component referenced by
<parameter>com_object</parameter>. Returns
<literal>false</literal> on error, returns the

View file

@ -229,7 +229,7 @@
as-is. The "Z" format will always return "0" when using
<function>gmdate</function>.
<example>
<title><function>Date</function> example</title>
<title><function>date</function> example</title>
<programlisting role="php">
print (date ("l dS of F Y h:i:s A"));
print ("July 1, 2000 is on a " . date ("l", mktime(0,0,0,7,1,2000)));
@ -242,7 +242,7 @@ print ("July 1, 2000 is on a " . date ("l", mktime(0,0,0,7,1,2000)));
or the past.
<example>
<title>
<function>Date</function> and <function>mktime</function>
<function>date</function> and <function>mktime</function>
example
</title>
<programlisting>
@ -261,7 +261,7 @@ $nextyear = mktime (0,0,0,date("m"), date("d"), date("Y")+1);
like \n from become newlines.
<example>
<title>
<function>Date</function> Formatting
<function>date</function> Formatting
</title>
<programlisting>
/* Today is March 10th, 2001, 5:16:18 pm */
@ -442,7 +442,7 @@ echo "$month $mday, $year";
run in Finland (GMT +0200), the first line below prints "Jan 01
1998 00:00:00", while the second prints "Dec 31 1997 22:00:00".
<example>
<title><function>Gmdate</function> example</title>
<title><function>gmdate</function> example</title>
<programlisting role="php">
echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
@ -509,7 +509,7 @@ echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
"Dec 31 1998 20:00:00", while the second prints "Jan 01 1999
01:00:00".
<example>
<title><function>Gmstrftime</function> example</title>
<title><function>gmstrftime</function> example</title>
<programlisting role="php">
setlocale ('LC_TIME', 'en_US');
echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
@ -710,12 +710,12 @@ echo "Did nothing in $time seconds";
</para>
</note>
<para>
<function>Mktime</function> is useful for doing date arithmetic
<function>mktime</function> is useful for doing date arithmetic
and validation, as it will automatically calculate the correct
value for out-of-range input. For example, each of the following
lines produces the string "Jan-01-1998".
<example>
<title><function>Mktime</function> example</title>
<title><function>mktime</function> example</title>
<programlisting>
echo date ("M-d-Y", mktime (0,0,0,12,32,1997));
echo date ("M-d-Y", mktime (0,0,0,13,1,1997));
@ -977,7 +977,7 @@ echo strftime ("Last day in Feb 2000 is: %d", $lastday);
</para>
</note>
<example>
<title><function>Strftime</function> example</title>
<title><function>strftime</function> example</title>
<programlisting role="php">
setlocale ("LC_TIME", "C");
print (strftime ("%A in Finnish is "));
@ -1048,7 +1048,7 @@ print (strftime ("%A.\n"));
date format and will try to parse that format into a UNIX
timestamp.
<example>
<title><function>Strtotime</function> examples</title>
<title><function>strtotime</function> examples</title>
<programlisting role="php">
echo strtotime ("now") . "\n";
echo strtotime ("10 September 2000") . "\n";

View file

@ -181,7 +181,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
</funcprototype>
</funcsynopsis>
<para>
<function>Dba_close</function> closes the established database
<function>dba_close</function> closes the established database
and frees all resources specified by
<parameter>handle</parameter>.
</para>
@ -190,7 +190,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
<function>dba_open</function>.
</para>
<para>
<function>Dba_close</function> does not return any value.
<function>dba_close</function> does not return any value.
</para>
<para>
See also: <function>dba_open</function> and
@ -253,7 +253,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
</funcprototype>
</funcsynopsis>
<para>
<function>Dba_exists</function> checks whether the specified
<function>dba_exists</function> checks whether the specified
<parameter>key</parameter> exists in the database specified by
<parameter>handle</parameter>.
</para>
@ -265,7 +265,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
<function>dba_open</function>.
</para>
<para>
<function>Dba_exists</function> returns <literal>true</literal> or <literal>false</literal>, if the key is found
<function>dba_exists</function> returns <literal>true</literal> or <literal>false</literal>, if the key is found
or not found, respectively.
</para>
<para>
@ -291,7 +291,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
</funcprototype>
</funcsynopsis>
<para>
<function>Dba_fetch</function> fetches the data specified by
<function>dba_fetch</function> fetches the data specified by
<parameter>key</parameter> from the database specified with
<parameter>handle</parameter>.
</para>
@ -304,7 +304,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
</para>
<para>
<function>Dba_fetch</function> returns the associated string or <literal>false</literal>, if
<function>dba_fetch</function> returns the associated string or <literal>false</literal>, if
the key/data pair is found or not found, respectively.
</para>
<para>
@ -329,7 +329,7 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
</funcprototype>
</funcsynopsis>
<para>
<function>Dba_firstkey</function> returns the first key of the
<function>dba_firstkey</function> returns the first key of the
database specified by <parameter>handle</parameter> and resets
the internal key pointer. This permits a linear search through
the whole database.
@ -339,12 +339,12 @@ for ($i = 0; $i &lt; count($handle_later); $i++)
<function>dba_open</function>.
</para>
<para>
<function>Dba_firstkey</function> returns the key or <literal>false</literal>
<function>dba_firstkey</function> returns the key or <literal>false</literal>
depending on whether it succeeds or fails, respectively.
</para>
<para>
See also:
<function>Dba_nextkey</function>
<function>dba_nextkey</function>
and example 2 in the <link linkend="ref.dba">DBA overview</link>
</para>
</refsect1>

View file

@ -75,7 +75,7 @@
the directory that was opened. Three methods are available:
read, rewind and close.
<example>
<title><function>Dir</function> Example</title>
<title><function>dir</function> Example</title>
<programlisting role="php">
$d = dir("/etc");
echo "Handle: ".$d->handle."&lt;br>\n";

View file

@ -71,7 +71,7 @@
This is the only message type where the fourth parameter,
<parameter>extra_headers</parameter> is used. This message
type uses the same internal function as
<function>Mail</function> does.
<function>mail</function> does.
</entry>
</row>
<row>

View file

@ -230,7 +230,7 @@ chmod ("/somedir/somefile", 0755); // octal; correct value of mode
Makes a copy of a file. Returns true if the copy succeeded,
false otherwise.
<example>
<title><function>Copy</function> example</title>
<title><function>copy</function> example</title>
<programlisting role="php">
if (!copy($file, $file.'.bak')) {
print ("failed to copy $file...&lt;br>\n");
@ -292,7 +292,7 @@ if (!copy($file, $file.'.bak')) {
(<literal>/</literal>).</para>
<para>
<example>
<title><function>Dirname</function> example</title>
<title><function>dirname</function> example</title>
<programlisting role="php">
$path = "/etc/passwd";
$file = dirname ($path); // $file is set to "/etc"
@ -513,7 +513,7 @@ $df = disk_total_space("/"); // $df contains the total number of
CSV file (allowing for trailing line-end characters).
</simpara>
<simpara>
<function>Fgetcsv</function> returns false on error, including
<function>fgetcsv</function> returns false on error, including
end of file.
</simpara>
<simpara>
@ -523,7 +523,7 @@ $df = disk_total_space("/"); // $df contains the total number of
</simpara>
<example>
<title>
<function>Fgetcsv</function> example - Read and print entire
<function>fgetcsv</function> example - Read and print entire
contents of a CSV file
</title>
<programlisting role="php">
@ -1096,14 +1096,14 @@ $fcontents = join ('', file ('http://www.php.net'));
</itemizedlist>
</para>
<simpara>
<function>Flock</function> allows you to perform a simple
<function>flock</function> allows you to perform a simple
reader/writer model which can be used on virtually every platform
(including most Unices and even Windows). The optional 3rd
argument is set to true if the lock would block (EWOULDBLOCK
errno condition)
</simpara>
<simpara>
<function>Flock</function> returns true on success and false on
<function>flock</function> returns true on success and false on
error (e.g. when a lock could not be acquired).
</simpara>
<warning>
@ -1231,7 +1231,7 @@ $fcontents = join ('', file ('http://www.php.net'));
</para>
<para>
<example>
<title><function>Fopen</function> example</title>
<title><function>fopen</function> example</title>
<programlisting role="php">
$fp = fopen ("/home/rasmus/file.txt", "r");
$fp = fopen ("/home/rasmus/file.gif", "wb");
@ -1327,7 +1327,7 @@ $fp = fopen ("c:\\data\\info.txt", "r");
</funcprototype>
</funcsynopsis>
<para>
<function>Fputs</function> is an alias to
<function>fputs</function> is an alias to
<function>fwrite</function>, and is identical in every way. Note
that the <parameter>length</parameter> parameter is optional and
if not specified the entire string will be written.
@ -1350,7 +1350,7 @@ $fp = fopen ("c:\\data\\info.txt", "r");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Fread</function> reads up to
<function>fread</function> reads up to
<parameter>length</parameter> bytes from the file pointer
referenced by <parameter>fp</parameter>. Reading stops when
<parameter>length</parameter> bytes have been read or EOF is
@ -1422,7 +1422,7 @@ fclose ($fd);
return the number of assigned values. The optional parameters
must be passed by reference.
<example>
<title><function>Fscanf</function> Example</title>
<title><function>fscanf</function> Example</title>
<programlisting role="php">
$fp = fopen ("users.txt","r");
while ($userinfo = fscanf ($fp, "%s\t%s\t%s\n")) {
@ -1997,7 +1997,7 @@ if($fp){
</funcprototype>
</funcsynopsis>
<para>
<function>Link</function> creates a hard link.</para>
<function>link</function> creates a hard link.</para>
<para>
See also the <function>symlink</function> to create soft links,
and <function>readlink</function> along with
@ -2025,7 +2025,7 @@ if($fp){
</funcprototype>
</funcsynopsis>
<para>
<function>Linkinfo</function> returns the st_dev field of the
<function>linkinfo</function> returns the st_dev field of the
UNIX C stat structure returned by the lstat system call. This
function is used to verify if a link (pointed to by
<parameter>path</parameter>) really exists (using the same method
@ -2339,7 +2339,7 @@ $fp = popen ("/bin/ls", "r");
</funcprototype>
</funcsynopsis>
<para>
<function>Readlink</function> does the same as the readlink C
<function>readlink</function> does the same as the readlink C
function and returns the contents of the symbolic link path or 0
in case of error.
</para>
@ -2629,7 +2629,7 @@ $real_path = realpath ("../../index.php");
Returns the new temporary filename, or the null string on
failure.
<example>
<title><function>Tempnam</function> example</title>
<title><function>tempnam</function> example</title>
<programlisting role="php">
$tmpfname = tempnam ("/tmp", "FOO");
</programlisting>
@ -2710,7 +2710,7 @@ $tmpfname = tempnam ("/tmp", "FOO");
<para>
Returns true on success and false otherwise.
<example>
<title><function>Touch</function> example</title>
<title><function>touch</function> example</title>
<programlisting role="php">
if (touch ($FileName)) {
print "$FileName modification time has been
@ -2738,12 +2738,12 @@ if (touch ($FileName)) {
</funcprototype>
</funcsynopsis>
<para>
<function>Umask</function> sets PHP's umask to mask &amp; 0777 and
<function>umask</function> sets PHP's umask to mask &amp; 0777 and
returns the old umask. When PHP is being used as a server module,
the umask is restored when each request is finished.
</para>
<para>
<function>Umask</function> without arguments simply returns the
<function>umask</function> without arguments simply returns the
current umask.
</para>
<note>

View file

@ -370,7 +370,7 @@ ftp_quit($conn_id);
</para>
<para>
<example>
<title><function>Ftp_put</function> example</title>
<title><function>ftp_put</function> example</title>
<programlisting role="php">
$upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII);
</programlisting>

View file

@ -281,7 +281,7 @@ print_r($sv);
Returns the argument which is at the
<parameter>arg_num</parameter>'th offset into a user-defined
function's argument list. Function arguments are counted starting
from zero. <function>Func_get_arg</function> will generate a
from zero. <function>func_get_arg</function> will generate a
warning if called from outside of a function definition.
</simpara>
<simpara>
@ -307,7 +307,7 @@ foo (1, 2, 3);
</informalexample>
</para>
<simpara>
<function>Func_get_arg</function> may be used in conjunction with
<function>func_get_arg</function> may be used in conjunction with
<function>func_num_args</function> and
<function>func_get_args</function> to allow user-defined
functions to accept variable-length argument lists.
@ -338,7 +338,7 @@ foo (1, 2, 3);
<simpara>
Returns an array in which each element is the corresponding
member of the current user-defined function's argument
list. <function>Func_get_args</function> will generate a warning
list. <function>func_get_args</function> will generate a warning
if called from outside of a function definition.
</simpara>
<para>
@ -363,7 +363,7 @@ foo (1, 2, 3);
</informalexample>
</para>
<simpara>
<function>Func_get_args</function> may be used in conjunction
<function>func_get_args</function> may be used in conjunction
with <function>func_num_args</function> and
<function>func_get_arg</function> to allow user-defined functions
to accept variable-length argument lists.
@ -393,7 +393,7 @@ foo (1, 2, 3);
</funcsynopsis>
<simpara>
Returns the number of arguments passed into the current
user-defined function. <function>Func_num_args</function> will
user-defined function. <function>func_num_args</function> will
generate a warning if called from outside of a function
definition.
</simpara>
@ -412,7 +412,7 @@ foo (1, 2, 3); // Prints 'Number of arguments: 3'
</informalexample>
</para>
<simpara>
<function>Func_num_args</function> may be used in conjunction
<function>func_num_args</function> may be used in conjunction
with <function>func_get_arg</function> and
<function>func_get_args</function> to allow user-defined
functions to accept variable-length argument lists.

View file

@ -92,7 +92,7 @@
use an underscore character as an alias to this function.
</para>
<example>
<title><function>Gettext</function>-check</title>
<title><function>gettext</function>-check</title>
<programlisting>
&lt;?php
// Set language to German

View file

@ -24,7 +24,7 @@
</funcprototype>
</funcsynopsis>
<para>
The <function>Header</function> function is used at the top of an
The <function>header</function> function is used at the top of an
<acronym>HTML</acronym> file to send raw <acronym>HTTP</acronym>
header strings. See the <ulink url="&spec.http1.1;">HTTP 1.1
Specification</ulink> for more information on raw http headers.
@ -163,7 +163,7 @@ header ("Pragma: no-cache"); // HTTP/1.0
</funcprototype>
</funcsynopsis>
<para>
<function>Setcookie</function> defines a cookie to be sent along
<function>setcookie</function> defines a cookie to be sent along
with the rest of the header information. Cookies must be sent
<emphasis>before</emphasis> any other headers are sent (this is a
restriction of cookies, not PHP). This requires you to place
@ -212,7 +212,7 @@ header ("Pragma: no-cache"); // HTTP/1.0
<para>
Some examples follow how to send cookies:
<example>
<title><function>Setcookie</function> send examples</title>
<title><function>setcookie</function> send examples</title>
<programlisting role="php">
setcookie ("TestCookie", "Test Value");
setcookie ("TestCookie", $value,time()+3600); /* expire in 1 hour */

View file

@ -83,7 +83,7 @@ magic_quotes_sybase = On
execution of the script ends, unless it's closed earlier by explicitly calling
<function>ibase_close</function>.
<example>
<title><function>Ibase_connect</function> example</title>
<title><function>ibase_connect</function> example</title>
<programlisting role="php">
&lt;?php
$dbh = ibase_connect ($host, $username, $password);
@ -648,7 +648,7 @@ for ($i=0 ; $i &lt; $coln ; $i++) {
</para>
<note>
<para>
<function>Ibase_num_fields</function> is currently not functional
<function>ibase_num_fields</function> is currently not functional
in PHP 4.
</para>
</note>

View file

@ -78,7 +78,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Icap_fetch_event</function> fetches an event from the
<function>icap_fetch_event</function> fetches an event from the
calendar stream specified by <parameter>event_id</parameter>.
</para>
<para>
@ -186,7 +186,7 @@
datetimes.
</para>
<para>
<function>Icap_list_events</function> function takes in a
<function>icap_list_events</function> function takes in a
beginning datetime and an end datetime for a calendar stream. An
array of event id's that are between the given datetimes are
returned.
@ -244,7 +244,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Icap_store_event</function> Stores an event into
<function>icap_store_event</function> Stores an event into
an ICAP calendar. An event object consists of:
<itemizedlist>
<listitem>
@ -340,7 +340,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Icap_delete_event</function> deletes the calendar event
<function>icap_delete_event</function> deletes the calendar event
specified by the <parameter>uid</parameter>.
</para>
<para>
@ -364,7 +364,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Icap_snooze</function> turns on an alarm for a
<function>icap_snooze</function> turns on an alarm for a
calendar event specified by the <parameter>uid</parameter>.
</para>
<para>
@ -396,7 +396,7 @@
given datetime.
</para>
<para>
<function>Icap_list_alarms</function> function takes in a
<function>icap_list_alarms</function> function takes in a
datetime for a calendar stream. An array of event id's that has
an alarm should be going off at the datetime are returned.
</para>

View file

@ -537,7 +537,7 @@ imap_close($mbox);
</para>
<para>
<example>
<title><function>Imap_delete</function> Beispiel</title>
<title><function>imap_delete</function> Beispiel</title>
<programlisting role="php">
$mbox = imap_open ("{your.imap.host}INBOX", "username", "password")
or die ("can't connect: " . imap_last_error());

View file

@ -1192,14 +1192,14 @@ echo "Current PHP version: ".phpversion();
</funcprototype>
</funcsynopsis>
<simpara>
<function>Php_sapi_name</function> returns a lowercase string which
<function>php_sapi_name</function> returns a lowercase string which
describes the type of interface between web server and PHP
(Server API, SAPI). In CGI PHP, this string is "cgi", in
mod_php for Apache, this string is "apache" and so on.
</simpara>
<para>
<example>
<title><function>Php_sapi_name</function> Example</title>
<title><function>php_sapi_name</function> Example</title>
<programlisting role="php">
$sapi_type = php_sapi_name();
if ($sapi_type == "cgi")

View file

@ -30,7 +30,7 @@
</funcprototype>
</funcsynopsis>
<simpara>
<function>Mail</function> automatically mails the message
<function>mail</function> automatically mails the message
specified in <parameter>message</parameter> to the receiver
specified in <parameter>to</parameter>. Multiple recipients can
be specified by putting a comma between each address in

View file

@ -268,7 +268,7 @@
base higher than 10 will be represented with the letters a-z,
with a meaning 10, b meaning 11 and z meaning 35.
<example>
<title><function>Base_convert</function></title>
<title><function>base_convert</function></title>
<programlisting role="php">
$binary = base_convert ($hexadecimal, 16, 2);
</programlisting>
@ -680,7 +680,7 @@ var_dump(hexdec("a0"));
</funcprototype>
</funcsynopsis>
<para>
<function>Min</function> returns the numerically lowest of the
<function>min</function> returns the numerically lowest of the
parameter values.
</para>
<para>
@ -838,7 +838,7 @@ $randval = mt_rand();
</funcprototype>
</funcsynopsis>
<para>
<function>Number_format</function> returns a formatted version of
<function>number_format</function> returns a formatted version of
<parameter>number</parameter>. This function accepts either one,
two or four parameters (not three):
</para>

View file

@ -382,18 +382,18 @@ mcrypt_generic_end ($td);
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_get_cipher_name</function> is used to get the
<function>mcrypt_get_cipher_name</function> is used to get the
name of the specified cipher.
</para>
<para>
<function>Mcrypt_get_cipher_name</function> takes the cipher
<function>mcrypt_get_cipher_name</function> takes the cipher
number as an argument (libmcrypt 2.2.x) or takes the cipher name
as an argument (libmcrypt 2.4.x) and returns the name of the cipher
or false, if the cipher does not exist.
</para>
<para>
<example>
<title><function>Mcrypt_get_cipher_name</function> Example</title>
<title><function>mcrypt_get_cipher_name</function> Example</title>
<programlisting role="php">
&lt;?php
$cipher = MCRYPT_TripleDES;
@ -435,11 +435,11 @@ print mcrypt_get_cipher_name ($cipher);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_get_block_size</function> is used to get the
<function>mcrypt_get_block_size</function> is used to get the
size of a block of the specified <parameter>cipher</parameter>.
</para>
<para>
<function>Mcrypt_get_block_size</function> takes one or two
<function>mcrypt_get_block_size</function> takes one or two
arguments, the <parameter>cipher</parameter> and
<parameter>module</parameter>, and returns the size in bytes.
</para>
@ -472,11 +472,11 @@ print mcrypt_get_cipher_name ($cipher);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_get_key_size</function> is used to get the size
<function>mcrypt_get_key_size</function> is used to get the size
of a key of the specified <parameter>cipher</parameter>.
</para>
<para>
<function>Mcrypt_get_key_size</function> takes one or two
<function>mcrypt_get_key_size</function> takes one or two
arguments, the <parameter>cipher</parameter> and
<parameter>module</parameter>, and returns the size in bytes.
</para>
@ -504,7 +504,7 @@ print mcrypt_get_cipher_name ($cipher);
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_create_iv</function> is used to create an IV.
<function>mcrypt_create_iv</function> is used to create an IV.
</para>
<para>
<function>mcrypt_create_iv</function> takes two arguments,
@ -520,7 +520,7 @@ print mcrypt_get_cipher_name ($cipher);
</para>
<para>
<example>
<title><function>Mcrypt_create_iv</function> example</title>
<title><function>mcrypt_create_iv</function> example</title>
<programlisting role="php">
&lt;?php
$cipher = MCRYPT_TripleDES;
@ -569,7 +569,7 @@ $iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_cbc</function> encrypts or decrypts (depending
<function>mcrypt_cbc</function> encrypts or decrypts (depending
on <parameter>mode</parameter>) the <parameter>data</parameter>
with <parameter>cipher</parameter> and <parameter>key</parameter>
in CBC cipher mode and returns the resulting string.
@ -634,7 +634,7 @@ $iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_cfb</function> encrypts or decrypts (depending
<function>mcrypt_cfb</function> encrypts or decrypts (depending
on <parameter>mode</parameter>) the <parameter>data</parameter>
with <parameter>cipher</parameter> and <parameter>key</parameter>
in CFB cipher mode and returns the resulting string.
@ -698,7 +698,7 @@ $iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_ecb</function> encrypts or decrypts (depending
<function>mcrypt_ecb</function> encrypts or decrypts (depending
on <parameter>mode</parameter>) the <parameter>data</parameter>
with <parameter>cipher</parameter> and <parameter>key</parameter>
in ECB cipher mode and returns the resulting string.
@ -760,7 +760,7 @@ $iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_ofb</function> encrypts or decrypts (depending
<function>mcrypt_ofb</function> encrypts or decrypts (depending
on <parameter>mode</parameter>) the <parameter>data</parameter>
with <parameter>cipher</parameter> and <parameter>key</parameter>
in OFB cipher mode and returns the resulting string.
@ -809,19 +809,19 @@ $iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_list_algorithms</function> is used to get an
<function>mcrypt_list_algorithms</function> is used to get an
array of all supported algorithms in the
</para>
<para>
<parameter>lib_dir</parameter>.
<function>Mcrypt_list_algorithms</function> takes as optional
<function>mcrypt_list_algorithms</function> takes as optional
parameter a directory which specifies the directory where all
algorithms are located. If not specifies, the value of the
mcrypt.algorithms_dir php.ini directive is used.
</para>
<para>
<example>
<title><function>Mcrypt_list_algorithms</function> Example</title>
<title><function>mcrypt_list_algorithms</function> Example</title>
<programlisting role="php">
&lt;?php
$algorithms = mcrypt_list_algorithms ("/usr/local/lib/libmcrypt");
@ -858,19 +858,19 @@ foreach ($algorithms as $cipher) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_list_modes</function> is used to get an
<function>mcrypt_list_modes</function> is used to get an
array of all supported modes in the
<parameter>lib_dir</parameter>.
</para>
<para>
<function>Mcrypt_list_modes</function> takes as optional
<function>mcrypt_list_modes</function> takes as optional
parameter a directory which specifies the directory where all
modes are located. If not specifies, the value of the
mcrypt.modes_dir php.ini directive is used.
</para>
<para>
<example>
<title><function>Mcrypt_list_modes</function> Example</title>
<title><function>mcrypt_list_modes</function> Example</title>
<programlisting role="php">
&lt;?php
$modes = mcrypt_list_modes ();
@ -914,7 +914,7 @@ foreach ($modes as $mode) {
second when linked against libmcrypt 2.4.x.
</para>
<para>
<function>Mcrypt_get_iv_size</function> returns the size of
<function>mcrypt_get_iv_size</function> returns the size of
the Initialisation Vector (IV) in bytes. On error the function
returns FALSE. If the IV is ignored in the specified cipher/mode
combination zero is returned.
@ -956,7 +956,7 @@ foreach ($modes as $mode) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_encrypt</function> encrypts the data
<function>mcrypt_encrypt</function> encrypts the data
and returns the encrypted data.
</para>
<para>
@ -991,7 +991,7 @@ foreach ($modes as $mode) {
</para>
<para>
<example>
<title><function>Mcrypt_encrypt</function> Example</title>
<title><function>mcrypt_encrypt</function> Example</title>
<programlisting role="php">
&lt;?php
$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
@ -1035,7 +1035,7 @@ echo strlen ($crypttext)."\n";
</funcprototype>
</funcsynopsis>
<para>
<function>Mcrypt_decrypt</function> decrypts the data
<function>mcrypt_decrypt</function> decrypts the data
and returns the unencrypted data.
</para>
<para>
@ -1105,7 +1105,7 @@ echo strlen ($crypttext)."\n";
</para>
<para>
<example>
<title><function>Mcrypt_module_open</function> Example</title>
<title><function>mcrypt_module_open</function> Example</title>
<programlisting role="php">
&lt;?php
$td = mcrypt_module_open (MCRYPT_DES, "", MCRYPT_MODE_ECB, "/usr/lib/mcrypt-modes");
@ -1198,7 +1198,7 @@ $td = mcrypt_module_open (MCRYPT_DES, "", MCRYPT_MODE_ECB, "/usr/lib/mcrypt-mode
</para>
<para>
<example>
<title><function>Mdecrypt_generic</function> Example</title>
<title><function>mdecrypt_generic</function> Example</title>
<programlisting role="php">
&lt;?php
$iv_size = mcrypt_enc_get_iv_size ($td));

View file

@ -123,7 +123,7 @@ The hmac is 750c783e6ab0b503eaa86e310a5db738
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_get_hash_name</function> is used to get the name
<function>mhash_get_hash_name</function> is used to get the name
of the specified hash.
</para>
<para>
@ -133,7 +133,7 @@ The hmac is 750c783e6ab0b503eaa86e310a5db738
</para>
<para>
<example>
<title><function>Mhash_get_hash_name</function> Example</title>
<title><function>mhash_get_hash_name</function> Example</title>
<programlisting>
&lt;?php
$hash = MHASH_MD5;
@ -164,11 +164,11 @@ MD5
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_get_block_size</function> is used to get the size
<function>mhash_get_block_size</function> is used to get the size
of a block of the specified <parameter>hash</parameter>.
</para>
<para>
<function>Mhash_get_block_size</function> takes one argument, the
<function>mhash_get_block_size</function> takes one argument, the
<parameter>hash</parameter> and returns the size in bytes or
false, if the <parameter>hash</parameter> does not exist.
</para>
@ -189,7 +189,7 @@ MD5
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_count</function> returns the highest available hash
<function>mhash_count</function> returns the highest available hash
id. Hashes are numbered from 0 to this hash id.
</para>
<para>
@ -228,7 +228,7 @@ for ($i = 0; $i &lt;= $nr; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash</function> applies a hash function specified by
<function>mhash</function> applies a hash function specified by
<parameter>hash</parameter> to the <parameter>data</parameter> and
returns the resulting hash (also called digest). If the <parameter> key</parameter>
is specified it will return the resulting HMAC. HMAC is keyed hashing
@ -256,7 +256,7 @@ for ($i = 0; $i &lt;= $nr; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_keygen_s2k</function> generates a key that is
<function>mhash_keygen_s2k</function> generates a key that is
<parameter>bytes</parameter> long, from a user given password.
This is the Salted S2K algorithm as specified in the OpenPGP
document (RFC 2440). That algorithm will use the specified

View file

@ -187,7 +187,7 @@ echo Greeting; // outputs "Hello you."
</example>
</para>
<para>
<function>Define</function> returns <constant>TRUE</constant>
<function>define</function> returns <constant>TRUE</constant>
on success and <constant>FALSE</constant> if
an error occurs.
</para>
@ -346,7 +346,7 @@ if ($bad) {
<para>
<example>
<title>
<function>Eval</function> example - simple text merge
<function>eval</function> example - simple text merge
</title>
<programlisting role="php">
&lt;?php
@ -437,7 +437,7 @@ This is a cup with my coffee in it.
The following example shows how one might list all available
information retrieved about the user's browser.
<example>
<title><function>Get_browser</function> example</title>
<title><function>get_browser</function> example</title>
<programlisting role="php">
&lt;?php
function list_array ($array) {
@ -687,7 +687,7 @@ http://your.server.com/source/path/to/script.php
</funcprototype>
</funcsynopsis>
<simpara>
<function>Leak</function> leaks the specified amount of memory.
<function>leak</function> leaks the specified amount of memory.
</simpara>
<simpara>
This is useful when debugging the memory manager, which
@ -838,7 +838,7 @@ http://your.server.com/source/path/to/script.php
</listitem>
</itemizedlist>
<example>
<title><function>Pack</function> format string</title>
<title><function>pack</function> format string</title>
<programlisting role="php">
$binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
</programlisting>
@ -943,7 +943,7 @@ $binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Uniqid</function> returns a prefixed unique identifier
<function>uniqid</function> returns a prefixed unique identifier
based on the current time in microseconds. The prefix can be
useful for instance if you generate identifiers simultaneously on
several hosts that might happen to generate the identifier at the
@ -1000,17 +1000,17 @@ $better_token = md5 (uniqid (rand())); // better, difficult to guess
</funcprototype>
</funcsynopsis>
<para>
<function>Unpack</function> from binary string into array
<function>unpack</function> from binary string into array
according to <parameter>format</parameter>. Returns array
containing unpacked elements of binary string.
</para>
<para>
<function>Unpack</function> works slightly different from Perl as
<function>unpack</function> works slightly different from Perl as
the unpacked data is stored in an associative array. To
accomplish this you have to name the different format codes and
separate them by a slash /.
<example>
<title><function>Unpack</function> format string</title>
<title><function>unpack</function> format string</title>
<programlisting role="php">
$array = unpack ("c2chars/nint", $binarydata);
</programlisting>

View file

@ -855,7 +855,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Msql_num_rows</function> returns the number of rows in
<function>msql_num_rows</function> returns the number of rows in
a result set.
</para>
<para>

View file

@ -21,7 +21,7 @@
Returns: true on success, false on error.
</para>
<para>
<function>Mssql_close</function> closes the link to a MS SQL
<function>mssql_close</function> closes the link to a MS SQL
Server database that's associated with the specified link
identifier. If the link identifier isn't specified, the last
opened link is assumed.
@ -32,7 +32,7 @@
execution.
</para>
<para>
<function>Mssql_close</function> will not close persistent links
<function>mssql_close</function> will not close persistent links
generated by <function>mssql_pconnect</function>.
</para>
<para>
@ -68,7 +68,7 @@
on error.
</para>
<para>
<function>Mssql_connect</function> establishes a connection to a
<function>mssql_connect</function> establishes a connection to a
MS SQL server. The servername argument has to be a valid
servername that is defined in the 'interfaces' file.
</para>
@ -108,7 +108,7 @@
Returns: true on success, false on failure.
</para>
<para>
<function>Mssql_data_seek</function> moves the internal row
<function>mssql_data_seek</function> moves the internal row
pointer of the MS SQL result associated with the specified result
identifier to point to the specified row number. The next call
to <function>mssql_fetch_row</function> would return that row.
@ -137,7 +137,7 @@
if there are no more rows.
</para>
<para>
<function>Mssql_fetch_array</function> is an extended version of
<function>mssql_fetch_array</function> is an extended version of
<function>mssql_fetch_row</function>. In addition to storing the
data in the numeric indices of the result array, it also stores
the data in associative indices, using the field names as keys.
@ -175,7 +175,7 @@
Returns an object containing field information.
</para>
<para>
<function>Mssql_fetch_field</function> can be used in order to
<function>mssql_fetch_field</function> can be used in order to
obtain information about fields in a certain query result. If
the field offset isn't specified, the next field that wasn't yet
retrieved by <function>mssql_fetch_field</function> is retrieved.
@ -230,7 +230,7 @@
row, or false if there are no more rows.
</para>
<para>
<function>Mssql_fetch_object</function> is similar to
<function>mssql_fetch_object</function> is similar to
<function>mssql_fetch_array</function>, with one difference - an
object is returned, instead of an array. Indirectly, that means
that you can only access the data by the field names, and not by
@ -267,7 +267,7 @@
if there are no more rows.
</para>
<para>
<function>Mssql_fetch_row</function> fetches one row of data from
<function>mssql_fetch_row</function> fetches one row of data from
the result associated with the specified result identifier. The
row is returned as an array. Each result column is stored in an
array offset, starting at offset 0.
@ -507,7 +507,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Mssql_num_fields</function> returns the number of
<function>mssql_num_fields</function> returns the number of
fields in a result set.
</para>
<para>
@ -533,7 +533,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Mssql_num_rows</function> returns the number of rows in
<function>mssql_num_rows</function> returns the number of rows in
a result set.
</para>
<para>
@ -570,7 +570,7 @@
or false on error.
</para>
<para>
<function>Mssql_pconnect</function> acts very much like
<function>mssql_pconnect</function> acts very much like
<function>mssql_connect</function> with two major differences.
</para>
<para>
@ -612,7 +612,7 @@
on error.
</para>
<para>
<function>Mssql_query</function> sends a query to the currently
<function>mssql_query</function> sends a query to the currently
active database on the server that's associated with the
specified link identifier. If the link identifier isn't
specified, the last opened link is assumed. If no link is open,
@ -643,7 +643,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Mssql_result</function> returns the contents of one
<function>mssql_result</function> returns the contents of one
cell from a MS SQL result set. The field argument can be the
field's offset, the field's name or the field's table dot
field's name (tablename.fieldname). If the column name has been
@ -687,7 +687,7 @@
<para> Returns: true on success, false on error
</para>
<para>
<function>Mssql_select_db</function> sets the current active
<function>mssql_select_db</function> sets the current active
database on the server that's associated with the specified link
identifier. If no link identifier is specified, the last opened
link is assumed. If no link is open, the function will try to

View file

@ -454,7 +454,7 @@
</para>
<example>
<title><function>Mysql_db_name</function> example</title>
<title><function>mysql_db_name</function> example</title>
<programlisting role="php">
&lt;?php
error_reporting(E_ALL);
@ -739,7 +739,7 @@ select t1.f1 as foo t2.f1 as bar from t1, t2
<function>mysql_fetch_row</function> and <function>mysql_fetch_assoc</function>.
</para>
<example>
<title><function>Mysql_fetch_array</function> example</title>
<title><function>mysql_fetch_array</function> example</title>
<programlisting role="php">
&lt;?php
mysql_connect ($host, $user, $password);
@ -800,7 +800,7 @@ mysql_free_result ($result);
<function>mysql_fetch_row</function> and <function>mysql_fetch_array</function>.
</para>
<example>
<title><function>Mysql_fetch_assoc</function></title>
<title><function>mysql_fetch_assoc</function></title>
<programlisting role="php">
&lt;?php
mysql_connect ($host, $user, $password);
@ -911,7 +911,7 @@ mysql_free_result ($result);
</itemizedlist>
</para>
<example>
<title><function>Mysql_fetch_field</function></title>
<title><function>mysql_fetch_field</function></title>
<programlisting role="php">
&lt;?php
mysql_connect ($host, $user, $password)
@ -1994,7 +1994,7 @@ $result = mysql_query ("SELECT my_col FROM my_tbl")
<function>mysql_num_rows</function> function may be used to
determine the number of tables in the result pointer.
<example>
<title><function>Mysql_tablename</function> Example</title>
<title><function>mysql_tablename</function> Example</title>
<programlisting role="php">
&lt;?php
mysql_connect ("localhost:3306");

View file

@ -62,7 +62,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Closelog</function> closes the descriptor being used to
<function>closelog</function> closes the descriptor being used to
write to the system logger. The use of
<function>closelog</function> is optional.
</para>
@ -182,7 +182,7 @@
used to set a timeout in seconds for the connect system call.
</para>
<para>
<function>Fsockopen</function> returns a file pointer which may
<function>fsockopen</function> returns a file pointer which may
be used together with the other file functions (such as
<function>fgets</function>, <function>fgetss</function>,
<function>fputs</function>, <function>fclose</function>, and
@ -210,7 +210,7 @@
switch it to non-blocking mode by using
<function>socket_set_blocking</function>.
<example>
<title><function>Fsockopen</function> Example</title>
<title><function>fsockopen</function> Example</title>
<programlisting role="php">
$fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
if (!$fp) {
@ -392,7 +392,7 @@ if (!$fp) {
</funcprototype>
</funcsynopsis>
<para>
<function>Getprotobyname</function> returns the protocol number
<function>getprotobyname</function> returns the protocol number
associated with the protocol <parameter>name</parameter> as per
/etc/protocols.
</para>
@ -418,7 +418,7 @@ if (!$fp) {
</funcprototype>
</funcsynopsis>
<para>
<function>Getprotobynumber</function> returns the protocol name
<function>getprotobynumber</function> returns the protocol name
associated with protocol <parameter>number</parameter> as per
/etc/protocols.
</para>
@ -445,7 +445,7 @@ if (!$fp) {
</funcprototype>
</funcsynopsis>
<para>
<function>Getservbyname</function> returns the Internet port
<function>getservbyname</function> returns the Internet port
which corresponds to <parameter>service</parameter> for the
specified <parameter>protocol</parameter> as per
<filename>/etc/services</filename>.
@ -475,7 +475,7 @@ if (!$fp) {
</funcprototype>
</funcsynopsis>
<para>
<function>Getservbyport</function> returns the Internet service
<function>getservbyport</function> returns the Internet service
associated with <parameter>port</parameter> for the specified
<parameter>protocol</parameter> as per /etc/services.
<parameter>protocol</parameter> is either <literal>TCP</literal>
@ -508,7 +508,7 @@ if (!$fp) {
network address from its Internet standard format (dotted string)
representation.
<example>
<title><function>Ip2long</function> Example</title>
<title><function>ip2long</function> Example</title>
<programlisting role="php">
&lt;?php
$ip = gethostbyname("www.php.net");
@ -582,7 +582,7 @@ echo $out;
</funcprototype>
</funcsynopsis>
<para>
<function>Openlog</function> opens a connection to the system
<function>openlog</function> opens a connection to the system
logger for a program. The string <parameter>ident</parameter> is
added to each message. Values for <parameter>option</parameter>
and <parameter>facility</parameter> are given below.
@ -599,7 +599,7 @@ echo $out;
</para>
<para>
<table>
<title><function>Openlog</function> Options</title>
<title><function>openlog</function> Options</title>
<tgroup cols="2">
<thead>
<row>
@ -646,7 +646,7 @@ echo $out;
</para>
<para>
<table>
<title><function>Openlog</function> Facilities</title>
<title><function>openlog</function> Facilities</title>
<tgroup cols="2">
<thead>
<row>
@ -902,7 +902,7 @@ if(!$fp) {
</funcprototype>
</funcsynopsis>
<para>
<function>Syslog</function> generates a log message that will be
<function>syslog</function> generates a log message that will be
distributed by the system logger.
<parameter>priority</parameter> is a combination of the facility
and the level, values for which are given in the next section.
@ -913,7 +913,7 @@ if(!$fp) {
</para>
<para>
<table>
<title><function>Syslog</function> Priorities (in descending order)</title>
<title><function>syslog</function> Priorities (in descending order)</title>
<tgroup cols="2">
<thead>
<row>

View file

@ -31,7 +31,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_get_default_domain</function> returns the default
<function>yp_get_default_domain</function> returns the default
domain of the node or FALSE. Can be used as the domain parameter
for successive NIS calls.
</para>
@ -76,7 +76,7 @@ echo "Default NIS domain is: " . $domain;
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_order</function> returns the order number for a map
<function>yp_order</function> returns the order number for a map
or FALSE.
</para>
<para>
@ -117,7 +117,7 @@ echo "Default NIS domain is: " . $domain;
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_master</function> returns the machine name of
<function>yp_master</function> returns the machine name of
the master NIS server for a map.
</para>
<para>
@ -157,7 +157,7 @@ echo "Master for this map is: " . $master;
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_match</function> returns the value associated with
<function>yp_match</function> returns the value associated with
the passed key out of the specified map or FALSE. This key must
be exact.</para>
<para>
@ -202,7 +202,7 @@ echo "Matched entry is: " . $entry;
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_first</function> returns the first key-value
<function>yp_first</function> returns the first key-value
pair from the named map in the named domain, otherwise FALSE.
</para>
<para>
@ -245,7 +245,7 @@ echo "First entry in this map has key " . $key . " and value " . $value;
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_next</function> returns the next key-value pair in
<function>yp_next</function> returns the next key-value pair in
the named map after the specified key or FALSE.
</para>
<para>
@ -296,7 +296,7 @@ echo "The next entry after joe has key " . $key
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_errno</function> returns the error code of the
<function>yp_errno</function> returns the error code of the
previous operation.
</para>
<para>
@ -348,7 +348,7 @@ echo "The next entry after joe has key " . $key
</funcprototype>
</funcsynopsis>
<para>
<function>Yp_err_string</function> returns the error message
<function>yp_err_string</function> returns the error message
associated with the previous operation. Useful to indicate what
exactly went wrong.
</para>

View file

@ -147,11 +147,11 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_cmdtuples</function> returns the number of tuples
<function>pg_cmdtuples</function> returns the number of tuples
(instances) affected by INSERT, UPDATE, and DELETE queries. If no
tuple is affected the function will return 0.
<example>
<title><function>Pg_cmdtuples</function></title>
<title><function>pg_cmdtuples</function></title>
<programlisting role="php">
&lt;?php
$result = pg_exec ($conn, "INSERT INTO publisher VALUES ('Author')");
@ -373,7 +373,7 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa
if there are no more rows.
</para>
<para>
<function>Pg_fetch_array</function> is an extended version of
<function>pg_fetch_array</function> is an extended version of
<function>pg_fetch_row</function>. In addition to storing the
data in the numeric indices of the result array, it also stores
the data in associative indices, using the field names as keys.
@ -447,7 +447,7 @@ echo $arr["author"] . " &lt;- array\n";
row, or false if there are no more rows.
</para>
<para>
<function>Pg_fetch_object</function> is similar to
<function>pg_fetch_object</function> is similar to
<function>pg_fetch_array</function>, with one difference - an
object is returned, instead of an array. Indirectly, that means
that you can only access the data by the field names, and not by
@ -537,7 +537,7 @@ pg_close ($db_conn);
if there are no more rows.
</para>
<para>
<function>Pg_fetch_row</function> fetches one row of data from
<function>pg_fetch_row</function> fetches one row of data from
the result associated with the specified result identifier. The
row is returned as an array. Each result column is stored in an
array offset, starting at offset 0.
@ -621,7 +621,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_fieldname</function> will return the name of the
<function>pg_fieldname</function> will return the name of the
field occupying the given column number in the given PostgreSQL
result identifier. Field numbering starts from 0.
</para>
@ -643,7 +643,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_fieldnum</function> will return the number of the
<function>pg_fieldnum</function> will return the number of the
column slot that corresponds to the named field in the given
PosgreSQL result identifier. Field numbering starts at 0. This
function will return -1 on error.
@ -667,7 +667,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_fieldprtlen</function> will return the actual
<function>pg_fieldprtlen</function> will return the actual
printed length (number of characters) of a specific value in a
PostgreSQL result. Row numbering starts at 0. This function
will return -1 on an error.
@ -692,7 +692,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_fieldsize</function> will return the internal
<function>pg_fieldsize</function> will return the internal
storage size (in bytes) of the field number in the given
PostgreSQL result. Field numbering starts at 0. A field size of
-1 indicates a variable length field. This function will return
@ -718,7 +718,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_fieldtype</function> will return a string containing
<function>pg_fieldtype</function> will return a string containing
the type name of the given field in the given PostgreSQL result
identifier. Field numbering starts at 0.
</para>
@ -739,7 +739,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_freeresult</function> only needs to be called if you
<function>pg_freeresult</function> only needs to be called if you
are worried about using too much memory while your script is
running. All result memory will automatically be freed when the
script is finished. But, if you are sure you are not going to
@ -764,7 +764,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_getlastoid</function> can be used to retrieve the
<function>pg_getlastoid</function> can be used to retrieve the
<varname>oid</varname> assigned to an inserted tuple if the
result identifier is used from the last command sent via
<function>pg_exec</function> and was an SQL INSERT. This
@ -792,7 +792,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_host</function> will return the host name of the
<function>pg_host</function> will return the host name of the
given PostgreSQL connection identifier is connected to.
</para>
</refsect1>
@ -812,7 +812,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_loclose</function> closes an Inversion Large
<function>pg_loclose</function> closes an Inversion Large
Object. <parameter>Fd</parameter> is a file descriptor for the
large object from <function>pg_loopen</function>.
</para>
@ -833,7 +833,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_locreate</function> creates an Inversion Large
<function>pg_locreate</function> creates an Inversion Large
Object and returns the <varname>oid</varname> of the large
object. <parameter>conn</parameter> specifies a valid database
connection. PostgreSQL access modes INV_READ, INV_WRITE, and
@ -920,7 +920,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_loopen</function> open an Inversion Large Object and
<function>pg_loopen</function> open an Inversion Large Object and
returns file descriptor of the large object. The file descriptor
encapsulates information about the connection. Do not close the
connection before closing the large object file descriptor.
@ -971,7 +971,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_loreadall</function> reads a large object and
<function>pg_loreadall</function> reads a large object and
passes it straight through to the browser after sending all pending
headers. Mainly intended for sending binary data like images or sound.
</para>
@ -993,7 +993,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_lounlink</function> deletes a large object with the
<function>pg_lounlink</function> deletes a large object with the
<parameter>lobjid</parameter> identifier for that large object.
</para>
</refsect1>
@ -1014,7 +1014,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_lowrite</function> writes at most to a large object
<function>pg_lowrite</function> writes at most to a large object
from a variable <parameter>buf</parameter> and returns the number
of bytes actually written, or false in the case of an error.
<parameter>fd</parameter> is a file descriptor for the large
@ -1037,7 +1037,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_numfields</function> will return the number of
<function>pg_numfields</function> will return the number of
fields (columns) in a PostgreSQL result. The argument is a valid
result identifier returned by <function>pg_exec</function>. This
function will return -1 on error.
@ -1063,7 +1063,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_numrows</function> will return the number of rows in a
<function>pg_numrows</function> will return the number of rows in a
PostgreSQL result. The argument is a valid result identifier
returned by <function>pg_exec</function>. This function will
return -1 on error.
@ -1089,7 +1089,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_options</function> will return a string containing
<function>pg_options</function> will return a string containing
the options specified on the given PostgreSQL connection
identifier.
</para>
@ -1152,7 +1152,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_port</function> will return the port number that the
<function>pg_port</function> will return the port number that the
given PostgreSQL connection identifier is connected to.
</para>
</refsect1>
@ -1225,7 +1225,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_result</function> will return values from a result
<function>pg_result</function> will return values from a result
identifier produced by <function>pg_Exec</function>. The
<parameter>row_number</parameter> and
<parameter>fieldname</parameter> sepcify what cell in the table
@ -1394,7 +1394,7 @@ for ($i=0; $i&lt;$num; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Pg_tty</function> will return the tty name that server
<function>pg_tty</function> will return the tty name that server
side debugging output is sent to on the given PostgreSQL
connection identifier.
</para>

View file

@ -31,7 +31,7 @@
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_add_to_personal</function> adds a word to the personal
<function>pspell_add_to_personal</function> adds a word to the personal
wordlist. If you used <function>pspell_new_config</function> with
<function>pspell_config_personal</function> to open the dictionary,
you can save the wordlist later with
@ -40,7 +40,7 @@
</simpara>
<para>
<example>
<title><function>Pspell_add_to_personal</function></title>
<title><function>pspell_add_to_personal</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -70,7 +70,7 @@ pspell_save_wordlist ($pspell_link);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_add_to_session</function> adds a word to the wordlist
<function>pspell_add_to_session</function> adds a word to the wordlist
associated with the current session. It is very similar to
<function>pspell_add_to_personal</function>
</simpara>
@ -92,12 +92,12 @@ pspell_save_wordlist ($pspell_link);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_check</function> checks the spelling of a word
<function>pspell_check</function> checks the spelling of a word
and returns true if the spelling is correct, false if not.
</simpara>
<para>
<example>
<title><function>Pspell_check</function></title>
<title><function>pspell_check</function></title>
<programlisting role="php">
$pspell_link = pspell_new ("en");
@ -126,13 +126,13 @@ if (pspell_check ($pspell_link, "testt")) {
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_clear_session</function> clears the current session.
<function>pspell_clear_session</function> clears the current session.
The current wordlist becomes blank, and, for example, if you try to save
it with <function>pspell_save_wordlist</function>, nothing happens.
</simpara>
<para>
<example>
<title><function>Pspell_add_to_personal</function></title>
<title><function>pspell_add_to_personal</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -176,7 +176,7 @@ pspell_save_wordlist ($pspell_link); //"Vlad" will not be saved
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_create</function> has a very similar syntax to
<function>pspell_config_create</function> has a very similar syntax to
<function>pspell_new</function>. In fact, using
<function>pspell_config_create</function> immediatelly followed by
<function>pspell_new_config</function> will produce the exact same result.
@ -234,7 +234,7 @@ pspell_save_wordlist ($pspell_link); //"Vlad" will not be saved
</para>
<para>
<example>
<title><function>Pspell_config_create</function></title>
<title><function>pspell_config_create</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -261,14 +261,14 @@ $pspell_link = pspell_new_personal ($pspell_config, "en");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_ignore</function> should be used on a config
<function>pspell_config_ignore</function> should be used on a config
before calling <function>pspell_new_config</function>. This function
allows short words to be skipped by the spellchecker. Words less then
n characters will be skipped.
</simpara>
<para>
<example>
<title><function>Pspell_config_ignore</function></title>
<title><function>pspell_config_ignore</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_ignore($pspell_config, 5);
@ -295,7 +295,7 @@ pspell_check($pspell_link, "abcd"); //will not result in an error
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_mode</function> should be used on a config
<function>pspell_config_mode</function> should be used on a config
before calling <function>pspell_new_config</function>. This function
determines how many suggestions will be returned by
<function>pspell_suggest</function>.
@ -323,7 +323,7 @@ pspell_check($pspell_link, "abcd"); //will not result in an error
</para>
<para>
<example>
<title><function>Pspell_config_mode</function></title>
<title><function>pspell_config_mode</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_mode($pspell_config, PSPELL_FAST);
@ -350,7 +350,7 @@ pspell_check($pspell_link, "thecat");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_personal</function> should be used on a config
<function>pspell_config_personal</function> should be used on a config
before calling <function>pspell_new_config</function>. The personal
wordlist will be loaded and used in addition to the standard one after
you call <function>pspell_new_config</function>. If the file does not
@ -362,7 +362,7 @@ pspell_check($pspell_link, "thecat");
</simpara>
<para>
<example>
<title><function>Pspell_config_personal</function></title>
<title><function>pspell_config_personal</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -389,7 +389,7 @@ pspell_check ($pspell_link, "thecat");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_repl</function> should be used on a config
<function>pspell_config_repl</function> should be used on a config
before calling <function>pspell_new_config</function>. The replacement
pairs improve the quality of the spellchecker. When a word is misspelled,
and a proper suggestion was not found in the list,
@ -402,7 +402,7 @@ pspell_check ($pspell_link, "thecat");
</simpara>
<para>
<example>
<title><function>Pspell_config_repl</function></title>
<title><function>pspell_config_repl</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -430,7 +430,7 @@ pspell_check ($pspell_link, "thecat");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_runtogether</function> should be used on a config
<function>pspell_config_runtogether</function> should be used on a config
before calling <function>pspell_new_config</function>. This function
determines whether run-together words will be treated as legal
compounds. That is, "thecat" will be a legal compound,
@ -441,7 +441,7 @@ pspell_check ($pspell_link, "thecat");
</simpara>
<para>
<example>
<title><function>Pspell_config_runtogether</function></title>
<title><function>pspell_config_runtogether</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_runtogether ($pspell_config, true);
@ -469,7 +469,7 @@ pspell_check ($pspell_link, "thecat");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_config_save_repl</function> should be used on a config
<function>pspell_config_save_repl</function> should be used on a config
before calling <function>pspell_new_config</function>. It determines
whether <function>pspell_save_wordlist</function> will save the
replacement pairs along with the wordlist. Usually there is no need to use
@ -516,7 +516,7 @@ pspell_check ($pspell_link, "thecat");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_new</function> opens up a new dictionary and
<function>pspell_new</function> opens up a new dictionary and
returns the dictionary link identifier for use in other pspell
functions.
</simpara>
@ -584,7 +584,7 @@ pspell_check ($pspell_link, "thecat");
</para>
<para>
<example>
<title><function>Pspell_new</function></title>
<title><function>pspell_new</function></title>
<programlisting role="php">
$pspell_link = pspell_new ("en", "", "", "",
(PSPELL_FAST|PSPELL_RUN_TOGETHER));
@ -609,7 +609,7 @@ $pspell_link = pspell_new ("en", "", "", "",
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_new_config</function> opens up a new dictionary with
<function>pspell_new_config</function> opens up a new dictionary with
settings specified in a config, created with with
<function>pspell_config_create</function> and modified with
<function>pspell_config_*</function> functions. This method provides you
@ -623,7 +623,7 @@ $pspell_link = pspell_new ("en", "", "", "",
</para>
<para>
<example>
<title><function>Pspell_new_config</function></title>
<title><function>pspell_new_config</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -670,7 +670,7 @@ $pspell_link = pspell_new_personal ($pspell_config, "en");
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_new_personal</function> opens up a new dictionary with
<function>pspell_new_personal</function> opens up a new dictionary with
a personal wordlist and returns the dictionary link identifier for use
in other pspell functions. The wordlist can be modified and saved with
<function>pspell_save_wordlist</function>, if desired. However, the
@ -752,7 +752,7 @@ $pspell_link = pspell_new_personal ($pspell_config, "en");
</para>
<para>
<example>
<title><function>Pspell_new_personal</function></title>
<title><function>pspell_new_personal</function></title>
<programlisting role="php">
$pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws",
"en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER));
@ -776,7 +776,7 @@ $pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws",
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_save_wordlist</function> saves the personal wordlist
<function>pspell_save_wordlist</function> saves the personal wordlist
from the current session. The dictionary has to be open with
<function>pspell_new_personal</function>, and the location of files to be
saved specified with <function>pspell_config_personal</function> and
@ -786,7 +786,7 @@ $pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws",
</simpara>
<para>
<example>
<title><function>Pspell_add_to_personal</function></title>
<title><function>pspell_add_to_personal</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/tmp/dicts/newdict");
@ -816,7 +816,7 @@ pspell_save_wordlist ($pspell_link);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_store_replacement</function> stores a replacement pair for
<function>pspell_store_replacement</function> stores a replacement pair for
a word, so that replacement can be returned by
<function>pspell_suggest</function> later. In order to be able to take
advantage of this function, you have to use
@ -830,7 +830,7 @@ pspell_save_wordlist ($pspell_link);
</simpara>
<para>
<example>
<title><function>Pspell_store_replacement</function></title>
<title><function>pspell_store_replacement</function></title>
<programlisting role="php">
$pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
@ -860,12 +860,12 @@ pspell_save_wordlist ($pspell_link);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Pspell_suggest</function> returns an array of possible
<function>pspell_suggest</function> returns an array of possible
spellings for the given word.
</simpara>
<para>
<example>
<title><function>Pspell_suggest</function></title>
<title><function>pspell_suggest</function></title>
<programlisting role="php">
$pspell_link = pspell_new ("en");

View file

@ -43,7 +43,7 @@
<function>readline_add_history</function>.
</para>
<example>
<title><function>Readline</function></title>
<title><function>readline</function></title>
<programlisting role="php">
//get 3 commands from user
for ($i=0; $i &lt; 3; $i++) {

View file

@ -317,7 +317,7 @@ echo $string; /* Output: 'This string has 4 words.' */
To split off the first four fields from a line from
<filename>/etc/passwd</filename>:
<example>
<title><function>Split</function> Example</title>
<title><function>split</function> Example</title>
<programlisting role="php">
$passwd_list = split (":", $passwd_line, 5);
</programlisting>
@ -327,7 +327,7 @@ $passwd_list = split (":", $passwd_line, 5);
To parse a date which may be delimited with slashes, dots, or
hyphens:
<example>
<title><function>Split</function> Example</title>
<title><function>split</function> Example</title>
<programlisting role="php">
$date = "04/30/1973"; // Delimiters may be slash, dot, or hyphen
list ($month, $day, $year) = split ('[/.-]', $date);
@ -437,7 +437,7 @@ echo "Month: $month; Day: $day; Year: $year&lt;br&gt;\n";
character's uppercase and lowercase form if applicable, otherwise
it contains the original character twice.
<example>
<title><function>Sql_regcase</function> Example</title>
<title><function>sql_regcase</function> Example</title>
<programlisting role="php">
echo sql_regcase ("Foo bar");
</programlisting>

View file

@ -76,7 +76,7 @@
error.
</para>
<para>
<function>Sem_get</function> returns an id that can be used to
<function>sem_get</function> returns an id that can be used to
access the System V semaphore with the given key. The semaphore
is created if necessary using the permission bits specified in
perm (defaults to 0666). The number of processes that can
@ -118,7 +118,7 @@
Returns: <literal>TRUE</literal> on success, <literal>FALSE</literal> on error.
</para>
<para>
<function>Sem_acquire</function> blocks (if necessary) until the
<function>sem_acquire</function> blocks (if necessary) until the
semaphore can be acquired. A process attempting to acquire a
semaphore which it has already acquired will block forever
if acquiring the semaphore would cause its max_acquire value to
@ -153,7 +153,7 @@
Returns: <literal>TRUE</literal> on success, <literal>FALSE</literal> on error.
</para>
<para>
<function>Sem_release</function> releases the semaphore if it
<function>sem_release</function> releases the semaphore if it
is currently acquired by the calling process, otherwise
a warning is generated.
</para>
@ -191,7 +191,7 @@
on error.
</para>
<para>
<function>Sem_remove</function> removes the semaphore
<function>sem_remove</function> removes the semaphore
<parameter>sem_identifier</parameter> if it
has been created by <function>sem_get</function>,
otherwise generates a warning.
@ -233,7 +233,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Shm_attach</function> returns an id that that can be
<function>shm_attach</function> returns an id that that can be
used to access the System V shared memory with the given key, the
first call creates the shared memory segment with mem_size
(default: sysvshm.init_mem in the <link
@ -269,7 +269,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Shm_detach</function> disconnects from the shared
<function>shm_detach</function> disconnects from the shared
memory given by the <parameter>shm_identifier</parameter> created
by <function>shm_attach</function>. Remember, that shared memory
still exist in the Unix system and the data is still present.
@ -346,7 +346,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Shm_get_var</function> returns the variable with a given
<function>shm_get_var</function> returns the variable with a given
<parameter>variable_key</parameter>. The variable is still present
in the shared memory.
</para>

View file

@ -43,7 +43,7 @@
<parameter>charlist</parameter> like "\0..\37", which would
escape all characters with ASCII code between 0 and 31.
<example>
<title><function>Addcslashes</function> example</title>
<title><function>addcslashes</function> example</title>
<programlisting role="php">
$escaped = addcslashes ($not_escaped, "\0..\37!@\177..\377");
</programlisting>
@ -115,7 +115,7 @@ $escaped = addcslashes ($not_escaped, "\0..\37!@\177..\377");
<refentry id="function.chop">
<refnamediv>
<refname>Chop</refname>
<refname>chop</refname>
<refpurpose>Remove trailing whitespace</refpurpose>
</refnamediv>
<refsect1>
@ -130,7 +130,7 @@ $escaped = addcslashes ($not_escaped, "\0..\37!@\177..\377");
Returns the argument string without trailing whitespace,
including newlines.
<example>
<title><function>Chop</function> example</title>
<title><function>chop</function> example</title>
<programlisting role="php">
$trimmed = chop ($line);
</programlisting>
@ -152,7 +152,7 @@ $trimmed = chop ($line);
<refentry id="function.chr">
<refnamediv>
<refname>Chr</refname>
<refname>chr</refname>
<refpurpose>Return a specific character</refpurpose>
</refnamediv>
<refsect1>
@ -167,7 +167,7 @@ $trimmed = chop ($line);
Returns a one-character string containing the character specified
by <parameter>ascii</parameter>.
<example>
<title><function>Chr</function> example</title>
<title><function>chr</function> example</title>
<programlisting role="php">
$str .= chr (27); /* add an escape character at the end of $str */
@ -211,7 +211,7 @@ $str = sprintf ("The string ends in escape: %c", 27);
<parameter>end</parameter> (defaults to "\r\n"). It returns the
new string leaving the original string untouched.
<example>
<title><function>Chunk_split</function> example</title>
<title><function>chunk_split</function> example</title>
<programlisting role="php">
# format $data using RFC 2045 semantics
@ -487,12 +487,12 @@ $new_string = chunk_split (base64_encode($data));
Outputs all parameters.
</simpara>
<para>
<function>Echo</function> is not actually a function (it is a
<function>echo</function> is not actually a function (it is a
language construct) so you are not required to use parentheses
with it. In fact, if you want to pass more than one parameter
to echo, you must not enclose the parameters within parentheses.
<example>
<title><function>Echo</function> examples</title>
<title><function>echo</function> examples</title>
<programlisting role="php">
&lt;?php
echo "Hello World";
@ -529,7 +529,7 @@ echo ($some_var) ? 'true': 'false'; // changing the statement around
</example>
</para>
<para>
<function>Echo</function> also has a shortcut syntax, where you
<function>echo</function> also has a shortcut syntax, where you
can immediately follow the opening tag with an equals sign.
<informalexample>
<programlisting role="php">
@ -583,7 +583,7 @@ I have &lt;?=$foo?> foo.
</note>
<para>
<example>
<title><function>Explode</function> example</title>
<title><function>explode</function> example</title>
<programlisting role="php">
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode (" ", $pizza);
@ -931,7 +931,7 @@ $new = htmlspecialchars("&lt;a href='test'&gt;Test&lt;/a&gt;", ENT_QUOTES);
array elements in the same order, with the glue string between
each element.
<example>
<title><function>Implode</function> example</title>
<title><function>implode</function> example</title>
<programlisting role="php">
$colon_separated = implode (":", $array);
</programlisting>
@ -1340,7 +1340,7 @@ echo "&lt;/PRE&gt;\n";
<refentry id="function.metaphone">
<refnamediv>
<refname>Metaphone</refname>
<refname>metaphone</refname>
<refpurpose>Calculate the metaphone key of a string</refpurpose>
</refnamediv>
<refsect1>
@ -1410,7 +1410,7 @@ echo "&lt;/PRE&gt;\n";
<refentry id="function.ord">
<refnamediv>
<refname>Ord</refname>
<refname>ord</refname>
<refpurpose>Return ASCII value of character</refpurpose>
</refnamediv>
<refsect1>
@ -1426,7 +1426,7 @@ echo "&lt;/PRE&gt;\n";
<parameter>string</parameter>. This function complements
<function>chr</function>.
<example>
<title><function>Ord</function> example</title>
<title><function>ord</function> example</title>
<programlisting role="php">
if (ord ($str) == 10) {
echo "The first character of \$str is a line feed.\n";
@ -1629,12 +1629,12 @@ $trimmed = rtrim ($line);
</funcsynopsis>
<para>
The function <function>sscanf</function> is the input analog of
<function>printf</function>. <function>Sscanf</function> reads from
<function>printf</function>. <function>sscanf</function> reads from
the string <parameter>str</parameter> and interprets it according to
the specified <parameter>format</parameter>. If only two parameters were
passed to this function, the values parsed will be returned as an array.
<example>
<title><function>Sscanf</function> Example</title>
<title><function>sscanf</function> Example</title>
<programlisting role="php">
// getting the serial number
$serial = sscanf("SN/2350001","SN/%d");
@ -1647,7 +1647,7 @@ echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n";
If optional parameters are passed, the function will return the number of
assigned values. The optional parameters must be passed by reference.
<example>
<title><function>Sscanf</function> - using optional parameters</title>
<title><function>sscanf</function> - using optional parameters</title>
<programlisting role="php">
// get author info and generate DocBook entry
$auth = "24\tLewis Carroll";
@ -1988,13 +1988,13 @@ printf($format,$num,$location);
<title>Examples</title>
<para>
<example>
<title><function>Sprintf</function>: zero-padded integers</title>
<title><function>sprintf</function>: zero-padded integers</title>
<programlisting role="php">
$isodate = sprintf ("%04d-%02d-%02d", $year, $month, $day);
</programlisting>
</example>
<example>
<title><function>Sprintf</function>: formatting currency</title>
<title><function>sprintf</function>: formatting currency</title>
<programlisting role="php">
$money1 = 68.75;
$money2 = 54.35;
@ -2684,7 +2684,7 @@ if (is_string ($pos) &amp;&amp; !$pos) {
If <parameter>needle</parameter> is not a string, it is converted
to an integer and applied as the ordinal value of a character.
<example>
<title><function>Strrchr</function> example</title>
<title><function>strrchr</function> example</title>
<programlisting role="php">
// get last directory in $PATH
$dir = substr (strrchr ($PATH, ":"), 1);
@ -2722,7 +2722,7 @@ $last = substr (strrchr ($text, 10), 1 );
<parameter>multiplier</parameter> has to be greater than 0.
</para>
<example>
<title><function>Str_repeat</function> example</title>
<title><function>str_repeat</function> example</title>
<programlisting role="php">
echo str_repeat ("-=", 10);
</programlisting>
@ -2890,7 +2890,7 @@ $var = strspn ("42 is the answer, what is the question ...", "1234567890");
</para>
<para>
<example>
<title><function>Strstr</function> example</title>
<title><function>strstr</function> example</title>
<programlisting role="php">
$email = 'sterling@designmultimedia.com';
$domain = strstr ($email, '@');
@ -2926,7 +2926,7 @@ print $domain; // prints @designmultimedia.com
could tokenize this string into its individual words by using the
space character as the token.
<example>
<title><function>Strtok</function> example</title>
<title><function>strtok</function> example</title>
<programlisting role="php">
$string = "This is an example string";
$tok = strtok ($string," ");
@ -2981,7 +2981,7 @@ while ($tok) {
umlaut-A (Ä) will not be converted.
</para>
<example>
<title><function>Strtolower</function> example</title>
<title><function>strtolower</function> example</title>
<programlisting role="php">
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
@ -3018,7 +3018,7 @@ print $str; # Prints mary had a little lamb and she loved it so
(ä) will not be converted.
</para>
<example>
<title><function>Strtoupper</function> example</title>
<title><function>strtoupper</function> example</title>
<programlisting role="php">
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper ($str);
@ -3127,7 +3127,7 @@ $bodytag = str_replace ("%body%", "black", "&lt;body text=%body%>");
different lengths, the extra characters in the longer of the two
are ignored.
<example>
<title><function>Strtr</function> example</title>
<title><function>strtr</function> example</title>
<programlisting role="php">
$addr = strtr($addr, "äåö", "aao");
</programlisting>
@ -3326,7 +3326,7 @@ print substr_count("This is a test", "is"); // prints out 2
</para>
<para>
<example>
<title><function>Substr_replace</function> example</title>
<title><function>substr_replace</function> example</title>
<programlisting role="php">
&lt;?php
$var = 'ABCDEFGH:/MNRPQR/';
@ -3355,7 +3355,7 @@ echo substr_replace ($var, '', 10, -1) . "&lt;br&gt;\n";
</para>
<note>
<simpara>
<function>Substr_replace</function> was added in PHP 4.0.
<function>substr_replace</function> was added in PHP 4.0.
</simpara>
</note>
</refsect1>
@ -3412,7 +3412,7 @@ echo substr_replace ($var, '', 10, -1) . "&lt;br&gt;\n";
instance, in the default "C" locale characters such as umlaut-a
(ä) will not be converted.
<example>
<title><function>Ucfirst</function> example</title>
<title><function>ucfirst</function> example</title>
<programlisting role="php">
$text = 'mary had a little lamb and she loved it so.';
$text = ucfirst ($text); // $text is now Mary had a little lamb

View file

@ -1774,7 +1774,7 @@ function swf_savedata ($data)
button in the current frame.
<example>
<title>
<function>Swf_addbuttonrecord</function> function example
<function>swf_addbuttonrecord</function> function example
</title>
<programlisting role="php">
swf_startButton ($objid, TYPE_MENUBUTTON);

View file

@ -365,7 +365,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Odbc_do</function> will execute a query on the given
<function>odbc_do</function> will execute a query on the given
connection.
</para>
</refsect1>
@ -777,7 +777,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Odbc_num_fields</function> will return the number of
<function>odbc_num_fields</function> will return the number of
fields (columns) in an ODBC result. This function will return -1
on error. The argument is a valid result identifier returned by
<function>odbc_exec</function>.
@ -961,7 +961,7 @@ longer than 4096 bytes, the contents is not
<literal>false</literal> on error.
</para>
<para>
<function>Odbc_result_all</function> will print all rows from a
<function>odbc_result_all</function> will print all rows from a
result identifier produced by <function>odbc_exec</function>. The
result is printed in HTML table format. With the optional string
argument <parameter>format</parameter>, additional overall table
@ -1434,7 +1434,7 @@ odbc_execute ($result);
</funcprototype>
</funcsynopsis>
<para>
<function>Odbc_foreignkeys</function> retrieves information about
<function>odbc_foreignkeys</function> retrieves information about
foreign keys. Returns an ODBC result identifier or
<literal>false</literal> on failure.
</para>

View file

@ -16,7 +16,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Base64_decode</function> decodes
<function>base64_decode</function> decodes
<parameter>encoded_data</parameter> and returns the original
data. The returned data may be binary.
</para>
@ -41,7 +41,7 @@
</funcprototype>
</funcsynopsis>
<para>
<function>Base64_encode</function> returns
<function>base64_encode</function> returns
<parameter>data</parameter> encoded with base64. This encoding
is designed to make binary data survive transport through
transport layers that are not 8-bit clean, such as mail bodies.
@ -131,7 +131,7 @@
with character conversions (like some email systems). For
example, if you want to include a password in an ftp url:
<example>
<title><function>Rawurlencode</function> example 1</title>
<title><function>rawurlencode</function> example 1</title>
<programlisting role="php">
echo '&lt;A HREF="ftp://user:', rawurlencode ('foo @+%/'),
'@ftp.my.com/x.txt">';
@ -139,7 +139,7 @@ echo '&lt;A HREF="ftp://user:', rawurlencode ('foo @+%/'),
</example>
Or, if you pass information in a path info component of the url:
<example>
<title><function>Rawurlencode</function> example 2</title>
<title><function>rawurlencode</function> example 2</title>
<programlisting role="php">
echo '&lt;A HREF="http://x.com/department_list_script/',
rawurlencode ('sales and marketing/Miami'), '">';
@ -171,7 +171,7 @@ echo '&lt;A HREF="http://x.com/department_list_script/',
Decodes any <literal>%<replaceable>##</replaceable></literal>
encoding in the given string. The decoded string is returned.
<example>
<title><function>Urldecode</function> example</title>
<title><function>urldecode</function> example</title>
<programlisting role="php">
$a = split ('&amp;', $QUERY_STRING);
$i = 0;
@ -219,7 +219,7 @@ while ($i &lt; count ($a)) {
convenient when encoding a string to be used in a query part of
an URL, as a convenient way to pass variables to the next page:
<example>
<title><function>Urlencode</function> example</title>
<title><function>urlencode</function> example</title>
<programlisting role="php">
echo '&lt;A HREF="mycgi?foo=', urlencode ($userinput), '"&gt;';
</programlisting>
@ -240,7 +240,7 @@ echo '&lt;A HREF="mycgi?foo=', urlencode ($userinput), '"&gt;';
arg_separator for this. Leave it as &amp;, but simply encode
your URLs using <function>htmlentities</function>(urlencode($data)).
<example>
<title><function>Urlencode/htmlentities</function> example</title>
<title><function>urlencode/htmlentities</function> example</title>
<programlisting role="php">
echo '&lt;A HREF="mycgi?foo=', htmlentities (urlencode ($userinput) ), '"&gt;';
</programlisting>

View file

@ -911,7 +911,7 @@ print_r ($a);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Serialize</function> returns a string containing a
<function>serialize</function> returns a string containing a
byte-stream representation of <parameter>value</parameter> that
can be stored anywhere.
</simpara>
@ -921,7 +921,7 @@ print_r ($a);
</simpara>
<simpara>
To make the serialized string into a PHP value again, use
<function>unserialize</function>. <function>Serialize</function>
<function>unserialize</function>. <function>serialize</function>
handles the types <type>integer</type>, <type>double</type>,
<type>string</type>, <type>array</type> (multidimensional) and
<type>object</type>.
@ -938,7 +938,7 @@ print_r ($a);
</note>
<para>
<example>
<title><function>Serialize</function> example</title>
<title><function>serialize</function> example</title>
<programlisting role="php">
// $session_data contains a multi-dimensional array with session
// information for the current user. We use serialize() to store
@ -1082,7 +1082,7 @@ settype($bar, "string"); // $bar is now "1" (string)
</note>
<para>
<example>
<title><function>Unserialize</function> example</title>
<title><function>unserialize</function> example</title>
<programlisting role="php">
// Here, we use unserialize() to load session data from a database
// into $session_data. This example complements the one described
@ -1137,7 +1137,7 @@ if (!odbc_execute ($stmt, &amp;$sqldata) || !odbc_fetch_into ($stmt, &amp;$tmp))
</para>
<para>
<example>
<title><function>Unset</function> example</title>
<title><function>unset</function> example</title>
<programlisting role="php">
// destroy a single variable
unset ($foo);
@ -1250,7 +1250,7 @@ foo();
</para>
<note>
<para>
<function>Unset</function> is a language construct.
<function>unset</function> is a language construct.
</para>
</note>
<para>

View file

@ -185,7 +185,7 @@ if (empty($term) || count($host) == 0) {
failure.
</para>
<para>
<function>Yaz_connect</function> prepares for a connection to a
<function>yaz_connect</function> prepares for a connection to a
Z39.50 target. The zurl argument takes the form
host[:port][/database]. If port is omitted 210 is used. If
database is omitted Default is used. This function is
@ -264,7 +264,7 @@ if (empty($term) || count($host) == 0) {
</funcprototype>
</funcsynopsis>
<para>
<function>Yaz_hits</function> returns number of hits for last
<function>yaz_hits</function> returns number of hits for last
search.
</para>
</refsect1>

View file

@ -290,12 +290,12 @@ print "&lt;/pre>\n&lt;/h1>&lt;/body>\n&lt;/html>\n";
more information about the strategy parameter.)
</para>
<para>
<function>Gzopen</function> can be used to read a file which is
<function>gzopen</function> can be used to read a file which is
not in gzip format; in this case <function>gzread</function> will
directly read from the file without decompression.
</para>
<para>
<function>Gzopen</function> returns a file pointer to the file
<function>gzopen</function> returns a file pointer to the file
opened, after that, everything you read from this file descriptor
will be transparently decompressed and what you write gets
compressed.
@ -310,7 +310,7 @@ print "&lt;/pre>\n&lt;/h1>&lt;/body>\n&lt;/html>\n";
</para>
<para>
<example>
<title><function>Gzopen</function> Example</title>
<title><function>gzopen</function> Example</title>
<programlisting role="php">
$fp = gzopen ("/tmp/file.gz", "r");
</programlisting>
@ -373,7 +373,7 @@ $fp = gzopen ("/tmp/file.gz", "r");
</funcprototype>
</funcsynopsis>
<para>
<function>Gzputs</function> is an alias to
<function>gzputs</function> is an alias to
<function>gzwrite</function>, and is identical in every way.
</para>
</refsect1>
@ -536,7 +536,7 @@ gzclose ($zd);
</funcprototype>
</funcsynopsis>
<simpara>
<function>Gzwrite</function> writes the contents of
<function>gzwrite</function> writes the contents of
<parameter>string</parameter> to the gz-file stream pointed to by
<parameter>zp</parameter>. If the <parameter>length</parameter>
argument is given, writing will stop after
@ -579,7 +579,7 @@ gzclose ($zd);
output.
</para>
<para>
<function>Readgzfile</function> can be used to read a file which
<function>readgzfile</function> can be used to read a file which
is not in gzip format; in this case
<function>readgzfile</function> will directly read from the file
without decompression.

View file

@ -920,7 +920,7 @@ echo "$a $hello";
the <function>SetCookie</function> function. Cookies are part of
the HTTP header, so the SetCookie function must be called before
any output is sent to the browser. This is the same restriction
as for the <function>Header</function> function. Any cookies
as for the <function>header</function> function. Any cookies
sent to you from the client will automatically be turned into a
PHP variable just like GET and POST method data.</simpara>