« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 15 for strrev (0.001 sec.)
strrev — 文字列を逆順にする | PHP 8.3 15030
strrev (PHP 4, PHP 5, PHP 7, PHP 8) strrev — 文字列を逆順にする 説明 function strrev ( string $string ): string string を逆順にして返します。 パラメータ string 逆順にしたい文字列。 戻り値 逆順にした文字列を返します。 例 例1 strrev() で文字列 ... を逆順にする <?php echo strrev ( "Hello world!" ); // 出力は "!dlrow olleH" となります ?> 他のマニュアルの関連ページ Linux JM tac(1) Linux JM tail(1) Lin ...
https://man.mtool.work/php/8.3/function.strrev.html
Basic Gearman client and worker, background | PHP 8.3 9021
Basic Gearman client and worker, background 例1 Basic Gearman client and worker, background This example shows a very simple client and worker. The client sends a string to the job server as a background job, and the worker reverses the str ... tus: " . ( $x + 1 ) . "/ $workload_size complete\n" ; $job -> sendStatus ( $x , $workload_size ); sleep ( 1 ); } $result = strrev ( $workload ); echo "Result: $result \n" ; # Return what we want to send back to the client. return $result ; } # A much s ... impler and less verbose version of the above function would be: function reverse_fn_fast ( $job ) { return strrev ( $job -> workload ()); } ?> 上の例の出力は、 たとえば以下のようになります。 % php reverse_worker.php Starting Waiting for ...
https://man.mtool.work/php/8.3/gearman.examples-reverse-bg.html
Basic usage | PHP 8.3 8899
Basic usage 例1 Basic Gearman client and worker This example shows a very simple client and worker. The client sends a string to the job server, and the worker reverses the string and sends it back. The job is performed synchronously. <?php ... tus: " . ( $x + 1 ) . "/ $workload_size complete\n" ; $job -> sendStatus ( $x , $workload_size ); sleep ( 1 ); } $result = strrev ( $workload ); echo "Result: $result \n" ; # Return what we want to send back to the client. return $result ; } # A much s ... impler and less verbose version of the above function would be: function reverse_fn_fast ( $job ) { return strrev ( $job -> workload ()); } ?> 上の例の出力は、 たとえば以下のようになります。 % php reverse_worker.php Starting Waiting for ...
https://man.mtool.work/php/8.3/gearman.examples-reverse.html
Basic Gearman client and worker, submitting tasks | PHP 8.3 8690
Basic Gearman client and worker, submitting tasks 例1 Basic Gearman client and worker, submitting tasks In this example, the basic reverse client extended to run two tasks in parallel. The reverse worker is unchanged except to add sending o ... job -> sendStatus ( $x + 1 , $workload_size ); $job -> sendData ( substr ( $workload , $x , 1 )); sleep ( 1 ); } $result = strrev ( $workload ); echo "Result: $result \n" ; # Return what we want to send back to the client. return $result ; } # A much s ... impler and less verbose version of the above function would be: function reverse_fn_fast ( $job ) { return strrev ( $job -> workload ()); } ?> 上の例の出力は、 たとえば以下のようになります。 % php reverse_worker.php Starting Waiting for ...
https://man.mtool.work/php/8.3/gearman.examples-reverse-task.html
GearmanClient::do — Run a single task and return a result [deprecated] | PHP 8.... 8481
GearmanClient::do (PECL gearman >= 0.5.0) GearmanClient::do — Run a single task and return a result [deprecated] 説明 public function GearmanClient::do ( string $function_name , string $workload , string $unique = ? ): string The GearmanCli ... AN_SUCCESS ) { echo "return_code: " . $gmworker -> returnCode () . "\n" ; break; } } function reverse_fn ( $job ) { return strrev ( $job -> workload ()); } ?> 上の例の出力は、 たとえば以下のようになります。 Starting Sending job Success: !olleH 例2 Subm ... job -> sendStatus ( $x + 1 , $workload_size ); $job -> sendData ( substr ( $workload , $x , 1 )); sleep ( 1 ); } $result = strrev ( $workload ); echo "Result: $result \n" ; # Return what we want to send back to the client. return $result ; } ?> 上の例の ...
https://man.mtool.work/php/8.3/gearmanclient.do.html
GearmanClient::doNormal — Run a single task and return a result | PHP 8.3 8481
GearmanClient::doNormal (No version information available, might only be in Git) GearmanClient::doNormal — Run a single task and return a result 説明 public function GearmanClient::doNormal ( string $function , string $workload , ? string $ ... AN_SUCCESS ) { echo "return_code: " . $gmworker -> returnCode () . "\n" ; break; } } function reverse_fn ( $job ) { return strrev ( $job -> workload ()); } ?> 上の例の出力は、 たとえば以下のようになります。 Starting Sending job Success: !olleH 例2 Subm ... job -> sendStatus ( $x + 1 , $workload_size ); $job -> sendData ( substr ( $workload , $x , 1 )); sleep ( 1 ); } $result = strrev ( $workload ); echo "Result: $result \n" ; # Return what we want to send back to the client. return $result ; } ?> 上の例の ...
https://man.mtool.work/php/8.3/gearmanclient.donormal.html
GearmanWorker::work — Wait for and perform jobs | PHP 8.3 8377
GearmanWorker::work (PECL gearman >= 0.5.0) GearmanWorker::work — Wait for and perform jobs 説明 public function GearmanWorker::work (): bool Waits for a job to be assigned and then calls the appropriate callback function. Issues an E_WARNI ... start te worker listening for job submissions while ( $worker -> work ()); function my_reverse_function ( $job ) { return strrev ( $job -> workload ()); } ?> 参考 GearmanWorker::addFunction() - Register and add callback function 他のマニュアルの関連ペ ...
https://man.mtool.work/php/8.3/gearmanworker.work.html
GearmanWorker::addFunction — Register and add callback function | PHP 8.3 8255
GearmanWorker::addFunction (PECL gearman >= 0.5.0) GearmanWorker::addFunction — Register and add callback function 説明 public function GearmanWorker::addFunction ( string $function_name , callable $function , mixed $context = null , int $t ... # start the worker while ( $worker -> work ()); function reverse_cb ( $job , & $count ) { $count ++; return " $count : " . strrev ( $job -> workload ()); } ?> Running a client that submits two jobs for the reverse function would have output similar to ...
https://man.mtool.work/php/8.3/gearmanworker.addfunction.html
GearmanWorker::setTimeout — Set socket I/O activity timeout | PHP 8.3 8255
GearmanWorker::setTimeout (PECL gearman >= 0.6.0) GearmanWorker::setTimeout — Set socket I/O activity timeout 説明 public function GearmanWorker::setTimeout ( int $timeout ): true Sets the interval of time to wait for socket I/O activity. パ ... cho "return_code: " . $gmworker -> returnCode () . "\n" ; break; } } echo "Done\n" ; function reverse_fn ( $job ) { return strrev ( $job -> workload ()); } ?> Running the worker with no submitted jobs will generate output that looks like the following: ...
https://man.mtool.work/php/8.3/gearmanworker.settimeout.html
GearmanWorker::wait — Wait for activity from one of the job servers | PHP 8.3 8150
GearmanWorker::wait (PECL gearman >= 0.6.0) GearmanWorker::wait — Wait for activity from one of the job servers 説明 public function GearmanWorker::wait (): bool Causes the worker to wait for activity from one of the Gearman job servers whe ... p ( 5 ); continue; } break; } } echo "Worker Error: " . $worker -> error () . "\n" ; function reverse_fn ( $job ) { return strrev ( $job -> workload ()); } ?> 参考 GearmanWorker::work() - Wait for and perform jobs 他のマニュアルの関連ページ Linux JM wa ...
https://man.mtool.work/php/8.3/gearmanworker.wait.html
PREV 1 2 NEXT