text
stringlengths
1
254
output
stringlengths
2
255
Only suffixes are supported by default.
UDM_PARAM_CROSS_WORDS - enables or disables crosswords support. Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED.
Prefixes support may also be found useful for site 's spelling checking purposes.
The corsswords feature allows to assign words between a href="xxx" and /a also to a document this link leads to. It works in SQL database mode and is not supported in built-in database and Cachemode.
It works in SQL database mode and is not supported in built-in database and Cachemode.
注意 Crosswords are supported only in mnoGoSearch 3.1.11 or later.
(PHP 3 = 3.0.4, PHP 4)
(PHP 3 = 3.0.4, PHP 4)
If the array you wish to sort needs to be sorted by some non-trivial criteria, you should use this function.
この関数は、ユーザー定義の比較関数を用いて配列のキーをソートします。 ソートしたい配列を複雑な基準でソートする必要がある場合には、 この関数を使う必要があります。
Example 1. uksort() example
例 1 uksort() の例
1;} $a = array (4 = "four", 3 = "three", 20 = "twenty", 10 = "ten"); uksort ($a, "cmp"); while (list ($key, $value) = each ($a)) {echo "$key: $value\n";}
この例による出力は以下のようになります。
See also usort(), uasort(), sort(), asort(), arsort(), ksort(), natsort(), and rsort().
注意 関数名の代わりに、オブジェクトへのリファレンスを格納した配列とメソッド名を指定することも出来ます。
uasort
usort(), uasort(), sort(), asort(), arsort(), ksort(), natsort(), rsort() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
When PHP is being used as a server module, the umask is restored when each request is finished.
umask() はPHPのumaskをmask 0777にセットし、 元のumask値を返します。PHPがサーバ・モジュールとして動作中の場合、 各リクエストが終了するたびにumaskは元の値に戻されます。
umask() without arguments simply returns the current umask.
umask() を引数無しで実行すると、単に現在の umask値を返します。
touch
注意 この関数はWindows環境にはまだ実装されていません。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
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.
uniqid() は、ミリ秒単位の現在時刻に基づき先頭辞 (prefix)を付けたユニークなIDを返します。いくつかのホスト上で同 時にIDを生成させる場合、全く同じミリ秒のIDが生成されるのを防ぐの にprefixが有用です。 prefix には114文字まで の長さを指定することができます。
If the optional lcg parameter is TRUE, uniqid() will add additional "combined LCG "entropy at the end of the return value, which should make the results more unique.
オプションの lcg パラメータが TRUE の場合、 uniqid() は、より結果をユニークにするために "combined LCG" を返り値の最後に追加します。
If lcg is TRUE, it will be 23 characters.
prefix を空とした場合、返される文字列の長さは、 13文字となります。 lcg が TRUE の場合は、 23文字となります。
The lcg parameter is only available in PHP 4 and PHP 3.0.13 and later.
注意 lcg パラメータは、PHP 4またはPHP 3.0.13以 降でのみ使用可能です。
$token = md5( uniqid("")); / / no prefix $better_token = md5(uniqid(rand(),1)); / / better, difficult to guess
ユニークなIDまたはトークンが必要な場合、そして、ネットワーク経由 でユーザーにそのトークンを渡そうとする場合(例えば、セッションクッ キー)、次の例のようにするのが推奨されます。
Prev
この例は、極めて予測困難な 32 文字のID(128ビット16進数)を 作成します。
Prev
(PHP 4)
Return the Julian Day for a UNIX timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given.
UNIX歴(1970/1/1からの秒数) timestamp をユリウス歴 に変換して返します。 timestamp が指定されない場合は 現在の日付が使用されます。
Prev
jdtounix() も参照下さい。
Deletes filename.
(PHP 3, PHP 4)
Returns TRUE on success or FALSE on failure.
filename を削除します。Unix C言語の関数unlink() と動作は同じです。
Prev
成功した場合に TRUE 、失敗した場合に FALSE を返します。
Forms Data Format functions
ディレクトリの削除には、 rmdir() を参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Returns array containing unpacked elements of binary string.
format に基づきバイナリ文字列から配列に分解 します。バイナリ文字列の切出された要素を保持する配列を返します。
To accomplish this you have to name the different format codes and separate them by a slash /.
unpack() の動作はPerlとわずかに異なり、 切出されたデータは連想配列に保存されます。 実行する際には、別のフォーマットコードとし、スラッシュ/で 区切る必要があります。
Example 1. unpack() format string
例 1フォーマット文字列の unpack()
The resulting array will contain the entries "chars1", "chars2" and "int ".
結果の配列は、エントリ "chars1","chars2","int" を保持します。
Note that PHP internally stores integral values as signed.
フォーマットコードに関する説明は、 pack() も参照下さい。
Prev
PHP は内部的に整数を符号付で保持します。 大きな値の unsigned long を切出した場合、PHP の内部で保持された値は、 同じ大きさの符号付き整数となり、符号無しを指定して切出された場合でも 結果は負の数となります。
Prev
(PHP 4 = 4.0.3)
De-registers the function named by function_name so it is no longer executed when a tick is called.
func という名前の関数の登録を解除します。 これにより、 tick がコールされた場 合でもこの関数は実行されなくなります。
(PHP 3 = 3.0.5, PHP 4)
(PHP 3 = 3.0.5, PHP 4)
The converted value is returned, and can be an integer, float, string, array or object.
unserialize() は、シリアル化された変数 (serialize() を参照) をとり、PHP 変数値に 戻す変換を行います。変換された値が返されます。その値は、 integer, float, string, array, object とすることが可能です。オブジェクトがシリアル化された場合、返り値 にそのメソッドは保存されていません。
If the variable being unserialized is an object, after successfully reconstructing the object PHP will automatically attempt to call the __wakeup() member function (if it exists).
例 1unserialize_callback_funcの例
PHP 4 removes that limitation and restores both properties and methods.
例 2 unserialize() の例
Example 2. unserialize() example
serialize() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
As such no value is returned, and attempting to take the value of unset() results in a parse error.
unset() は指定した変数を破棄します。PHP 3では、 unset() は常に TRUE (実際には整数値1) を返して いました。しかし、PHP 4では unset() はもはや真 の意味で関数ではなく、命令となっています。値が返されないため、 unset() の値を取得しようとすると、パースエラー となります。
Example 1. unset() example
例 1 unset() の例
The behavior of unset() inside of a function can vary depending on what type of variable you are attempting to destroy.
関数 unset() の内部動作は、破棄しようとする変数 の型に依存します。
The variable in the calling environment will retain the same value as before unset() was called.
あるグローバル変数が関数の中で unset() された場 合、ローカル変数のみが破棄されます。呼出側の環境にある変数は、 unset() がコールされる前と同じ値を保持します。
The variable in the calling environment will retain the same value as before unset() was called.
参照渡しされた変数が関数内で unset() された場合 に、ローカル変数のみが破棄されます。呼出側の環境でその変数は、 unset() がコールされる前と同じ値を保持します。
something something
静的変数が関数の内部で unset() された場合、 unset() は、その変数とその静的変数への全てのリ ファレンスを破棄します。
If you would like to unset() a global variable inside of a function, you can use the $GLOBALS array to do so:
グローバル変数を関数内で unset() したい場合、 配列 $GLOBALS を使用し、次のようにして下さい。
See also isset() and empty().
注意 unset() は言語の一部です。
unserialize
isset() 、 empty() も参照下さい。
The decoded string is returned.
(PHP 3, PHP 4)
$a = explode( '', $QUERY_STRING); $i = 0; while ($i count($a)) {$b = split('=', $a[$i]); echo'Value for parameter ', htmlspecialchars(urldecode($b[0])),' is', htmlspecialchars(urldecode($b[1])), "br / \n"; $i++;}
与えられた文字列中のあらゆるエンコード文字% ## をデコードします。 デコードされた文字列が返ります。
Prev
例 1 urldecode() の使用例
rawurlencode
urlencode() 、 rawurlencode() 、 rawurldecode() も参考にしてください。
It is encoded the same way that the posted data from a WWW form is encoded, that is the same way as in application / x-www-form-urlencoded media type.
(PHP 3, PHP 4)
This is an obvious hassle that the W3C has been telling people about for years.
例 1 urlencode() の使用例
Leave it as, but simply encode your URLs using htmlentities() (urlencode($data)).
例 2 urlencode/htmlentities() の例
See also urldecode(), htmlentities(), rawurldecode(), rawurlencode().
urldecode(), htmlentities(), rawurldecode(), rawurlencode() も参考にしてください。
Prev
(PHP 4)
This is an alias for the function trigger_error().
これは、 trigger_error() へのエイリアスです。
Prev
error_reporting(), set_error_handler(), restore_error_handler(), trigger_error() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
A microsecond is one millionth of a second.
usleep() 関数は、指定した micro_seconds の時間だけプログラムの実行を 遅延させます。
Note:
sleep() も参照下さい。
Prev
注意 この関数はWindowsシステムでは動作しません。
This function will sort an array by its values using a user-supplied comparison function.
(PHP 3 = 3.0.3, PHP 4)
The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
この関数は、ユーザー定義の比較関数により配列をその値でソートします。 ソートしたい配列を複雑な基準でソートする必要がある場合、 この関数を使用するべきです。
Up to PHP 4.0.6 the user defined functions would keep the original order for those elements, but with the new sort algorithm intruduced with 4.1.0 this is no longer the case as there is no solution to do so in an efficient way.
比較関数は、最初の引数が2番目の引数より小さいか、等しいか、大きい 場合に、それぞれゼロ未満、ゼロに等しい、ゼロより大きい整数を返す 必要があります。2つのメンバーの比較結果が等しいとなった場合、 ソートされた配列の順番は定義されません。
1;} $a = array (3, 2, 5, 6, 1); usort ($a, "cmp"); while (list ($key, $value) = each ($a)) {echo "$key: $value\n";}
比較関数としてあるオブジェクトのメンバー関数を使用することも可能です。 以下の例3を参照下さい。
0:
例 1 usort() の例
5 2:
この例は以下を表示します:
Obviously in this trivial case the rsort() function would be more appropriate.
注意 もちろん、このような簡単な例では rsort() 関数 の方がより適当です。
Example 2. usort() example using multi-dimensional array
例 2多次元配列を使用する usort() の例
When sorting a multi-dimensional array, $a and $b contain references to the first index of the array.
この例の出力は以下となります。
$fruits[ 0]: apples $fruits[1]: grapes $fruits[2]: lemons
例 3 usort() でオブジェクトのメンバ関数を使用する例
Example 3. usort() example using a member function of an object
この例の出力は以下のようになります。
This example would display:
(Solarisシステムのような)いくつかのCライブラリに含まれる quicksort関数は、比較関数が適当な値を返さない場合にPHPをクラッ シュさせる可能性があります。
Prev
uasort(), uksort(), sort(), asort(), arsort(), ksort(), natsort(), rsort() も参照下さい。
Prev
(PHP 3 = 3.0.6, PHP 4)
This function decodes data, assumed to be UTF-8 encoded, to ISO-8859-1.
この関数は、 UTF-8 エンコードされたデータを ISO-8859-1 への変換するものとして、 data をデコードします。
Prev
UTF-8 エンコード法の説明については、 utf8_encode() を参照下さい。
This function encodes the string data to UTF-8, and returns the encoded version.
(PHP 3 = 3.0.6, PHP 4)
Table 1.
表 1UTF-8エンコーディング
(PHP 3 = 3.0.5, PHP 4)
(PHP 3 = 3.0.5, PHP 4)
Arrays are explored recursively with values indented to show structure.
この関数は、指定した式に関してその型や値を含む構造化された情報を 返します。配列の場合、その構造を表示するために各値について再帰的 に探索されます。
As with anything that outputs its result directly to the browser, you can use the output-control functions to capture the output of this function, and save it in a string (for example).
ティップ ブラウザに直接結果を出力する全てのものと同様に、 出力制御関数 を使用してこの関数の出力をキャプチャーし、文字列等に保存することが可能です。
Example 1. var_dump() example
var_dump() を print_r() と比較して見て下さい。
This function returns structured information about the variable that is passed to this function.
(PHP 4 = 4.2.0)
You can also return the variable representation by using TRUE as second parameter to this function.
この関数は、この関数に渡された変数に関する構造化された情報を返し ます。この関数は、 var_dump() に似ていますが、 返される表現が有効なPHPコードであるところが異なります。
pre ?php $a = array (1, 2, array ("a", "b", "c")); var_export ($a); / * output: array (0 = 1, 1 = 2, 2 = array (0 = 'a', 1 = 'b', 2 = 'c',),) * / $b = 3.1; $v = var_export($b, TRUE); echo $v; / * output:
この関数の2番目の引数に TRUE を指定することにより、変数表現を返す ことも可能です。
Prev
var_export() を var_dump() と 比較して下さい。
(PHP 4 = 4.1.0)
(PHP 4 = 4.1.0)
This is useful if you would like to write programs working only on some versions of PHP.
version_compare() は、二の"PHP標準"バージョン番 号文字列を比較します。この関数は、いくつかのバージョンのPHPでのみ 動作するプログラムを書きたい場合に有用です。
If you specify the third optional operator argument, you can test for a particular relationship.
version_compare() は、最初のバージョンが2番目 よりも小さい場合に-1、等しい場合に0、2番目が小さい場合に+1を返し ます。
Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise.
3番目のオプション引数 operator を指定した場 合、特定の関係を調べることが可能です。指定可能な演算子を以下に示 します。, lt, =, le,, gt, =, ge, ==, =, eq, !=,, ne この引数を用いると、この関数はこの演算子により指定された関係が成 り立つ場合に1、そうでない場合に0を返します。
/ / prints -1 echo version_compare( "4.0.4", "4.0.6"); / / these all print 1 echo version_compare("4.0.4", "4.0.6", ""); echo version_compare("4.0.6", "4.0.6", "eq");
例 1 version_compare() の例
Note that for a CGI script, the script must generate valid CGI headers.
(PHP 3, PHP 4)
Warning
(4.0.5 - 4.2.3 only)
Use this function at your own risk.
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。