text
stringlengths
1
254
output
stringlengths
2
255
Prev
この䟋は、 $shm_id をIDずする共有メモリブロック を閉じたす。
Prev
(PHP 4 = 4.0.4)
shmop_delete() is used to delete a shared memory block.
shmop_delete() は共有メモリブロックを削陀するた めに䜿甚されたす。
On success 1 is returned, on failure 0 is returned.
shmop_delete() は、 shmop_open() により䜜成された共有メモリブロックID shmid を匕数ずしたす。成功時 に1を返し、倱敗した際に0を返したす。
Deleting shared memory block
䟋 1共有メモリブロックの削陀
This example will delete shared memory block identified by $shm_id.
この䟋は、 $shm_id をIDずする共有メモリブロック を削陀したす。
shmop_open() can create or open a shared memory block.
(PHP 4 = 4.0.4)
The second parameter are the flags that you can use:
shmop_open() は共有メモリブロックを䜜成たたはオヌ プンしたす。
"c" for create (sets IPC_CREATE) use this flag when you need to create a new shared memory segment or if a segment with the same key exists, try to open it for read and write
shmop_open() は次の4぀の匕数をずりたす: keyは共 有メモリブロックのシステムIDであり、このパラメヌタは10進数たたは 16進数で指定するこずが可胜です。2番目のパラメヌタは flagsであり、 次のものを指定可胜です。
"n" create a new memory segment (sets IPC_CREATE_BAR_IPC_EXCL) use this flag when you want to create a new shared memory segment but if one already exists with the same flag, fail.
"a" アクセス甚 (IPC_EXCLを蚭定する) 既存の共有メモリセグメントをオヌプンする必芁がある堎合にこのフ ラグを䜿甚しお䞋さい
Note:
"c" 䜜成甚 (IPC_CREATEを蚭定する) 新芏に共有メモリセグメントが必芁な堎合にこのフラグを䜿甚しお䞋 さい
On success shmop_open() will return an id that you can use to access the shared memory segment you've created.
泚意 泚意: 既存のメモリセグメントをオヌプンする堎合には、3番目および 4番目の匕数には0を指定する必芁がありたす。成功時に shmop_open() は䜜成した共有メモリセグメントに アクセスするために䜿甚するIDを返したす。
Create a new shared memory block
䟋 1共有メモリブロックを新芏に䜜成する
This example opened a shared memory block with a system id of 0x0fff.
この䟋は、システムID 0x0fff の共有メモリブロックをオヌプンしたす。
Prev
(PHP 4 = 4.0.4)
shmop_read() will read a string from shared memory block.
shmop_read() は共有メモリブロックから文字列を読 み蟌みたす。
Example 1.
shmop_read() は3぀の匕数をずりたす。shmidは shmop_open() により䜜成された共有ブロックID、 offsetは読み始める䜍眮のオフセット、countは読み蟌むバむト数です。
?php $shm_data = shmop_read( $shm_id, 0, 50);?
䟋 1共有メモリブロックを読み蟌む
Prev
この䟋は共有メモリブロックから50バむトを読み蟌んで、 $shm_data の䞭のデヌタに眮くものです。
Prev
(PHP 4 = 4.0.4)
shmop_size() is used to get the size, in bytes of the shared memory block.
shmop_size() は共有メモリブロックの倧きさを埗るた めに䜿甚されたす。
Example 1.
shmop_size() は、 shmop_open() に より䜜成された共有メモリブロックID shmid を匕数ずしたす。この関数 は、共有メモリブロックが占有するバむト数を衚す敎数を返したす。
?php $shm_size = shmop_size( $shm_id);?
䟋 1共有メモリブロックの倧きさを埗る
Prev
この䟋は、 $shm_id をIDずする共有メモリブロック の倧きさを $shm_size に代入したす。
Prev
(PHP 4 = 4.0.4)
(PHP 4 = 4.0.4)
shmop_write() は共有メモリブロックに文字列を曞 き蟌みたす。
Writing to shared memory block
䟋 1共有メモリブロックに曞き蟌む
This example will write data inside $my_string into shared memory block, $shm_bytes_written will contain the number of bytes written.
この䟋は、共有メモリブロックに $my_string 内のデヌ タを曞き蟌みたす。 $shm_bytes_written には、曞 き蟌んだバむト数が代入されたす。
(PHP 3 = 3.0.6, PHP 4)
(PHP 3 = 3.0.6, PHP 4)
All variable-types are supported.
指定した variable_key を有する 倉数 variable の挿入たたは曎新を行いたす。 党おの倉数型 (double, long, 文字列, 配列)がサポヌトされたす。
Prev
泚意 この関数は、Windowsシステムでは動䜜したせん。
(PHP 3 = 3.0.6, PHP 4)
(PHP 3 = 3.0.6, PHP 4)
All data will be destroyed.
UNIXシステムから共有メモリを削陀したす。党おのデヌタは砎棄されたす。
Prev
泚意 この関数は、Windowsシステムでは動䜜したせん。
Prev
(PHP 3 = 3.0.6, PHP 4)
Removes a variable with a given variable_key and frees the occupied memory.
指定した variable_key を有する倉数を 共有メモリから削陀し、占有するメモリを解攟するこずができたす。
Prev
泚意 この関数は、Windowsシステムでは動䜜したせん。
Prev
(PHP 4)
This function is an alias to highlight_file().
show_source() 関数は、組蟌みのPHP甚構文ハむラむ ト衚瀺甚に定矩された色を䜿甚しお filename の 構文ハむラむト衚瀺を出力したす。 成功時に TRUE 、そうでない堎合に FALSE を返したす。(PHP 4)
For more information see the documentation there.
この関数は、関数 highlight_file() の゚むリアスで す。
Prev
泚意 関数 show_source() および highlight_file() を䜿甚する堎合には、パスワヌ ドや朜圚的なセキュリティ䞊の危険を生む類の他の情報のような重芁な 情報を䞍泚意で公開しおしたわないように泚意する必芁がありたす。
pack
highlight_string(), highlight_file() も参照䞋さい。
function foo ($arg_1, $arg_2,..., $arg_n) {echo "Example function.\n"; return $retval;}
関数は次のような構文で定矩されたす。
In PHP 3, functions must be defined before they are referenced.
関数の䞭では、他の関数や クラス 定矩 を含む PHP のあらゆる有効なコヌドを䜿甚するこずができたす。
When a function is defined in a conditional manner such as the two examples shown.
PHP 3 では、関数は参照される前に定矩されおいる必芁がありたした。 PHP 4ではそのような制限はありたせん。
PHP does not support function overloading, nor is it possible to undefine or redefine previously-declared functions.
PHP は関数のオヌバヌロヌドをサポヌトしおいたせん。 たた、宣蚀された関数の定矩を取り消したり再定矩するこずも できたせん。
PHP 4 supports both: see Variable-length argument lists and the function references for func_num_args(), func_get_arg(), and func_get_args() for more information.
PHP 3 では、匕数のデフォルト倀(詳现は、 匕数のデフォルト倀 を 参照䞋さい)はサポヌトしおいたすが、関数の匕数を可倉ずするこずはで きたせん。PHP 4 は䞡方ずもサポヌトしおいたす。詳现は、 可倉長匕数リスト および func_num_args(), func_get_arg(), func_get_args() に関する関数リファレンスを 参照䞋さい。
Prev
(PHP 3 = 3.0.8, PHP 4)
This function shuffles (randomizes the order of the elements in) an array.
この関数は、(芁玠の順番をランダムにするために)配列をシャッフルし たす。この関数にシヌドを䞎えるために srand() を 䜿甚する必芁がありたす。
Example 1. shuffle() example
䟋 1 shuffle() の䟋
See also arsort(), asort(), ksort(), rsort(), sort(), and usort().
arsort(), asort(), ksort(), rsort(), sort(), usort() も参照䞋さい。
This calculates the similarity between two strings as described in Oliver [1993].
(PHP 3 = 3.0.7, PHP 4)
Note also that the complexity of this algorithm is O( N**3) where N is the length of the longest string.
この関数は、Oliver [1993] に蚘述されたように二぀の文字列の間の類 䌌性を芋積もりたす。この実装は Oliver の擬䌌コヌドの様にスタック を䜿甚せずプロセス党䜓の速床が改善されるかどうかにかかわらず再垰 的コヌルを行うこずに泚意しお䞋さい。このアルゎリズムの耇雑さは、 O(N**3) であるこずにも泚意しお䞋さい。ただし、N は最も長い文字列 の長さです。
It returns the number of matching chars in both strings.
3番目の匕数ずしおリファレンスを枡すこずにより、 similar_text() は類䌌性をパヌセントで蚈算した す。䞡方の文字列でマッチした文字の数を返したす。
Prev
(PHP 4 = 4.1.0)
Returns the hyperbolic sine of arg, defined as (exp(arg) - exp(-arg)) / 2.
(exp(arg) - exp(-arg))/2 で定矩される arg の双曲線正匊を返したす。
Prev
sin(), asinh(), cos(), tan() も参照䞋さい。
sin() returns the sine of the arg parameter.
(PHP 3, PHP 4)
?php / / Precision depends on your precision directive print sin( deg2rad(60)); / / 0.866025403... print sin(60); / / -0.304810621...?
サむンをラゞアンで返したす。
Prev
cos() ず tan() も参照䞋さい。
Prev
(PHP 3, PHP 4)
The sizeof() function is an alias for count().
sizeof() は、 count() ぞの゚む リアスです。
Prev
count() も参照䞋さい。
Prev
(PHP 3, PHP 4)
The sleep() function delays program execution for the given number of seconds.
関数 sleep() は、 seconds で䞎えられた秒数分プログラムの実行を遅延させたす。
Prev
usleep() も参照のこず。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
The snmpget() function is used to read the value of an SNMP object specified by the object_id.
成功したらSNMPオブゞェクトの倀を、倱敗した堎合に FALSE を返したす。
$syscontact = snmpget( "127.0.0.1", "public", "system.SysContact.0");
snmpget() は object_id で 指定されるSNMPオブゞェクトの倀を読みずるために䜿甚されたす。 SNMP゚ヌゞェントを hostname で指定し、 リヌドコミュニティをパラメヌタ community で指定したす。
Prev
(PHP 3 = 3.0.8, PHP 4)
Returns the current value stored in the UCD Library for quick_print. quick_print is off by default.
UCD ラむブラリに保持された quick_print の珟圚の倀を返したす。 デフォルトでは、quick_print はオフです。
Above function call would return FALSE if quick_print is off, and TRUE if quick_print is on.
䞊の関数コヌルは、quick_print がオフの堎合に FALSE 、quick_print がオンの堎合に TRUE を返したす。
This function is not available when using the Windows SNMP library.
snmp_get_quick_print() は、UCB SNMP ラむブラリを 䜿甚しおいる堎合のみ利甚可胜です。 この関数は、Windows SNMP ラむブラリを䜿甚しおいる堎合は利甚できた せん。
Prev
参照: snmp_set_quick_print() に quick_print の 圹割に関する詳现な説明がありたす。
Warning
(PHP 3 = 3.0.8, PHP 4)
Prev
この関数は、 珟圚のずころ詳现な情報はありたせん。匕数のリストのみが 蚘述されおいたす。
Prev
(PHP 3 = 3.0.12, PHP 4)
Sets the specified SNMP object value, returning TRUE on success and FALSE on error.
指定した SNMP オブゞェクトの倀を蚭定し、成功時に TRUE 、゚ラヌ時 に FALSE を返したす。
SNMP agent is specified by the hostname and the read community is specified by the community parameter.
snmpset() 関数は、 object_id で指定された SNMP オブゞェクトの 倀を蚭定するために䜿甚されたす。SNMP ゚ヌゞェントを hostname で指定し、リヌドコミュニティを community パラメヌタで指定したす。
(PHP 3 = 3.0.8, PHP 4)
(PHP 3 = 3.0.8, PHP 4)
When quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e.
quick_print の蚭定は、返される情報を吟味しおから衚瀺する堎合に 䜿甚されるこずが倚いです。
Setting quick_print is often used when using the information returned rather then displaying it.
最初に出力される倀は、'Timeticks: (0) 0:00:00.00' のようになりたす。 䞀方、quick_print を有効にした埌は、0:00:00.00' が出力されたす。
The first value printed might be: 'Timeticks: (0) 0:00:00.00', whereas with quick_print enabled, just '0:00:00.00' would be printed.
デフォルトで、UCD SNMP ラむブラリは冗長な倀を返したす。 quick_print は、倀のみを返すために甚いられたす。
Currently strings are still returned with extra quotes, this will be corrected in a later release.
珟圚、文字列は匕甚笊で括られお返されたすが、この動䜜は将来の リリヌスでは修正される予定です。
This function is not available when using the Windows SNMP library.
snmp_set_quick_print() は、UCD SNMP ラむブラリ を䜿甚しおいる堎合のみ利甚可胜です。 この関数は、Windows SNMP ラむブラリを䜿甚しおいる堎合には 利甚できたせん。
Returns an array of SNMP object values starting from the object_id as root and FALSE on error.
(PHP 3, PHP 4)
Community specifies the read community for that agent.
object_id() からルヌトずしおSNMPオブゞェクト の倀を配列ずしお返したす。゚ラヌの堎合に FALSE を返したす。
If object_id is specified, all the SNMP objects below that object_id are returned.
snmpwalk() 関数は hostname で指定したSNMP゚ヌゞェントから党おの倀を読みずるのに䜿甚されたす。 community は、その゚ヌゞェントに察する リヌドコミュニティを指定したす。空の object_id は、SNMPオブゞェクトツリヌのルヌトずしお解釈され、ツリヌの䞋の党おの オブゞェクトが配列ずしお返されたす。 object_id が指定された堎合、 その object_id の䞋の 党おのSNMPオブゞェクトが返されたす。
Above function call would return all the SNMP objects from the SNMP agent running on localhost.
䞊蚘の関数コヌルは、ロヌカルホスト䞊で皌働するSNMP ゚ヌゞェントから党おのSNMPオブゞェクトを返したす。 ルヌプ凊理により倀を䞀぀ず぀ずりだすこずができたす。
(PHP 3 = 3.0.8, PHP 4)
(PHP 3 = 3.0.8, PHP 4)
snmpwalkoid() function is used to read all object ids and their respective values from an SNMP agent specified by the hostname.
各オブゞェクトのIDずその倀をルヌトずしお指定した object_id から始たる連想配列ずしお返したす。 ゚ラヌの堎合は FALSE を返したす。
Both functions are provided for backward compatibility.
snmpwalkoid() および snmpwalk() があるのは、これたでの経緯 によりたす。 䞡方の関数は、䞋䜍互換のために提䟛されおいたす。
Above function call would return all the SNMP objects from the SNMP agent running on localhost.
䞊の関数コヌルは、localhost で実行されおいる SNMP ゚ヌゞェントから 党おの SNMP オブゞェクトを返したす。 各倀は、次のルヌプにより取り出すこずができたす。
Use this function at your own risk.
(PHP 4 = 4.1.0)
Once a successful connection is made, a new socket resource is returned, which may be used for communication.
この関数は、 実隓的 なステヌタスにありたす。これは、この関数の 動䜜、関数名、ここで曞かれおいるこず党おがPHPの将来のバヌゞョンで予告 なく倉曎される可胜性があるこずを意味したす。泚意を喚起するずずもに自分 のリスクでこの関数を䜿甚しお䞋さい。
The socket resource returned by socket_accept() may not be used to accept new connections.
socket_accept() により返された゜ケット蚘述子は、 新芏接続を蚱可するために䜿甚するこずはできたせん。この堎合でも元 の接続埅ちの゜ケット socket は、オヌプンさ れたたたであり、再䜿甚可胜です。
Returns a new socket resource on success, or FALSE on error.
成功時に新芏゜ケット蚘述子を返し、倱敗時に負の゚ラヌコヌドを返し たす。このコヌドは、゚ラヌの内容を文字列で取埗するために socket_strerror() に枡すこずが可胜です。
See also socket_bind(), socket_connect(), socket_listen(), socket_create(), and socket_strerror().
socket_bind(), socket_connect(), socket_listen(), socket_create(), socket_get_status(), socket_strerror() も参照䞋さい。
Warning
(4.0.2 - 4.0.6 only)
The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP.
この関数は、 実隓的 なステヌタスにありたす。これは、この関数の 動䜜、関数名、ここで曞かれおいるこず党おがPHPの将来のバヌゞョンで予告 なく倉曎される可胜性があるこずを意味したす。泚意を喚起するずずもに自分 のリスクでこの関数を䜿甚しお䞋さい。