mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
tabs to 4 spaces
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@31932 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e5931fe02b
commit
bbf9d70ec8
1 changed files with 10 additions and 10 deletions
|
@ -213,7 +213,7 @@ print_r($sv);
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
Returns true if script timed out. See the <link
|
||||
Returns true if script timed out. See the <link
|
||||
linkend="features.connection-handling">Connection Handling</link>
|
||||
description in the <link linkend="features">Features</link>
|
||||
chapter for a complete explanation.
|
||||
|
@ -443,7 +443,7 @@ This is a cup with my coffee in it.
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
This language construct terminates parsing of the script. It
|
||||
This language construct terminates parsing of the script. It
|
||||
does not return.
|
||||
</simpara>
|
||||
<simpara>
|
||||
|
@ -594,7 +594,7 @@ function foo() {
|
|||
echo "Number of arguments: $numargs\n";
|
||||
}
|
||||
|
||||
foo (1, 2, 3); // Prints 'Number of arguments: 3'
|
||||
foo (1, 2, 3); // Prints 'Number of arguments: 3'
|
||||
?>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
@ -1177,7 +1177,7 @@ $binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
|
|||
</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> (object properties will be serialized, but
|
||||
|
@ -1193,11 +1193,11 @@ $binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
|
|||
|
||||
$conn = odbc_connect ("webdb", "php", "chicken");
|
||||
$stmt = odbc_prepare ($conn,
|
||||
"UPDATE sessions SET data = ? WHERE id = ?");
|
||||
"UPDATE sessions SET data = ? WHERE id = ?");
|
||||
$sqldata = array (serialize($session_data), $PHP_AUTH_USER);
|
||||
if (!odbc_execute ($stmt, &$sqldata)) {
|
||||
$stmt = odbc_prepare($conn,
|
||||
"INSERT INTO sessions (id, data) VALUES(?, ?)");
|
||||
"INSERT INTO sessions (id, data) VALUES(?, ?)");
|
||||
if (!odbc_execute($stmt, &$sqldata)) {
|
||||
/* Something went wrong. Bitch, whine and moan. */
|
||||
}
|
||||
|
@ -1279,7 +1279,7 @@ function myErrorHandler ($errno, $errstr) {
|
|||
function scale_by_log ($vect, $scale) {
|
||||
if ( !is_numeric($scale) || $scale <= 0 )
|
||||
trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale",
|
||||
FATAL);
|
||||
FATAL);
|
||||
if (!is_array($vect)) {
|
||||
trigger_error("Incorrect input vector, array of values expected", ERROR);
|
||||
return null;
|
||||
|
@ -1287,7 +1287,7 @@ function scale_by_log ($vect, $scale) {
|
|||
for ($i=0; $i<count($vect); $i++) {
|
||||
if (!is_numeric($vect[$i]))
|
||||
trigger_error("Value at position $i is not a number, using 0 (zero)",
|
||||
WARNING);
|
||||
WARNING);
|
||||
$temp[$i] = log($scale) * $vect[$i];
|
||||
}
|
||||
return $temp;
|
||||
|
@ -1484,7 +1484,7 @@ if (assert($divisor == 0))
|
|||
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
|
||||
same microsecond. <parameter>Prefix</parameter> can be up to 114
|
||||
same microsecond. <parameter>Prefix</parameter> can be up to 114
|
||||
characters long.
|
||||
</simpara>
|
||||
<simpara>
|
||||
|
@ -1599,7 +1599,7 @@ $array = unpack ("c2chars/nint", $binarydata);
|
|||
<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
|
||||
// into $session_data. This example complements the one described
|
||||
// with <function>serialize</function>.
|
||||
|
||||
$conn = odbc_connect ("webdb", "php", "chicken");
|
||||
|
|
Loading…
Reference in a new issue