« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 68 for use case (0.002 sec.)
use (640), case (256)
switch | PHP 8.3 12861
switch (PHP 4, PHP 5, PHP 7, PHP 8) switch 文は、同じ式を用いて if 文を並べたのに似ています。 同じ変数や式を多くの異なる値と比較し、どの値に等しいかによって 異なったコードを実行する必要がある場合は、 switch 文を使うほうが便利で読みやすいこと ... プの内部で switch を使用しており、 外側のループの処理を続行させたい場合には、 continue 2 を使用してください。 注意 : switch/case が行うのは、 緩やかな比較 であることに注意しましょう。 以下の例では、それぞれのコードブロックが等価です。 一つは、 if と e ... 文を使っています。 どちらも、出力は同じです。 例1 switch 文の構造 <?php $i = 1 ; // これが switch 文です: switch ( $i ) { case 0 : echo "iは0に等しい\n" ; break; case 1 : echo "iは1に等しい\n" ; break; case 2 : echo "iは2に等しい\n" ; break; } // 上 ... ませんか?' ; break; } 上の例の出力は以下となります。 Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 6 Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colo ...
https://man.mtool.work/php/8.3/control-structures.switch.html
Deprecated Features | PHP 8.3 11858
Deprecated Features PHP Core Using "namespace" as a class constant name Declaring a class constant named namespace is now deprecated. namespace is a semi-reserved keyword, and the name is being reserved for possible future syntax such as a ... deprecation notice. These methods cannot declare a return type, and their return value can never be observed during normal use, which made returning a value confusing at best. Using return; without a value to skip the remaining logic is still allowe ... , or constant (including via define() ) is now deprecated, as is using either as the alias in a class_alias() call or in a use , use function , or use const declaration. The names are being reserved as keywords for potential future features: let for ... cated. Functions named _ , including the _() alias of gettext() , are not affected. Third argument to define() Passing the case_insensitive argument to define() is now deprecated. Case-insensitive constants were removed in PHP 8.0, since when the arg ...
https://man.mtool.work/php/8.3/migration86.deprecated.html
定義済み定数 | PHP 8.3 10736
定義済み定数 以下の定数は、PHP コアに含まれており、常に利用可能です。 CASE_LOWER ( int ) CASE_LOWER は、 array_change_key_case() で使用され、 配列のキーを小文字に変換するために使用されます。小文字は、 array_change_key_case() のデフォルトのケ ... ースで もあります。PHP 8.2.0 以降では、ASCII 文字のみが変換されます。 CASE_UPPER ( int ) CASE_UPPER は、 array_change_key_case() で使用され、配列のキー を大文字に変換するために使用されます。 PHP 8. ... SORT_NATURAL ( int ) SORT_NATURAL は、要素の比較を文字列として行い、 natsort() と同様の「自然順」で比較します。 SORT_FLAG_CASE ( int ) SORT_FLAG_CASE は SORT_STRING や SORT_NATURAL と (ビット OR で) 組み合わせて使い、 文字列のソートで大文字小文字を区 ... 別しないようにします。 PHP 8.2.0 以降では、ASCII のケースフォールディングのみが行われます。 フィルターのフラグ ARRAY_FILTER_USE_KEY ( int ) ARRAY_FILTER_USE_KEY は array_filter() で使うもので、 各キーをコールバック関数の最初の引数として渡すよう指示し ...
https://man.mtool.work/php/8.3/array.constants.html
The Swoole\Coroutine\Lock class | PHP 8.3 10661
The Swoole\Coroutine\Lock class (No version information available, might only be in Git) はじめに Swoole 6.0.1 introduced a coroutine lock that supports inter-process and inter-thread sharing. This lock is designed with non-blocking behavio ... nel supports the io_uring futex feature, Swoole's coroutine lock implements synchronization using io_uring futex . In this case, coroutines wait for lock wakeups using an efficient queuing mechanism, significantly improving performance. Without io_ur ... to safely perform multiple lock operations. 警告 Do not create locks in callback functions like onReceive , as this will cause continuous memory growth and lead to memory leaks. 警告 Locking and unlocking must be performed in the same coroutine, oth ... public function lock (): bool public function trylock (): bool public function unlock (): bool } 例 例1 Basic usage <?php use Swoole\Coroutine\Lock ; use Swoole\Coroutine\WaitGroup ; use function Swoole\Coroutine\go ; use function Swoole\Coroutine\ ...
https://man.mtool.work/php/8.3/class.swoole-coroutine-lock.html
Parser examples | PHP 8.3 10636
Parser examples 例1 Simple calculator <?php use Parle \{ Parser , ParserException , Lexer , Token }; $p = new Parser ; $p -> token ( "INTEGER" ); $p -> left ( "'+' '-' '*' '/'" ); $p -> push ( "start" , "exp" ); $prod_add = $p -> push ( "ex ... "exp '*' exp" ); $prod_div = $p -> push ( "exp" , "exp '/' exp" ); $p -> push ( "exp" , "INTEGER" ); /* Production index unused. */ $p -> build (); $lex = new Lexer ; $lex -> push ( "[+]" , $p -> tokenId ( "'+'" )); $lex -> push ( "[-]" , $p -> toke ... ); while ( Parser :: ACTION_ERROR != $p -> action && Parser :: ACTION_ACCEPT != $p -> action ) { switch ( $p -> action ) { case Parser :: ACTION_ERROR : throw new ParserException ( "Parser error" ); break; case Parser :: ACTION_SHIFT : case Parser :: ... ACTION_GOTO : case Parser :: ACTION_ACCEPT : break; case Parser :: ACTION_REDUCE : switch ( $p -> reduceId ) { case $prod_add : $l = $p -> si ...
https://man.mtool.work/php/8.3/parle.examples.parser.html
parallel\Runtime::run — Execution | PHP 8.3 10453
parallel\Runtime::run (0.8.0) parallel\Runtime::run — Execution 説明 public function parallel\Runtime::run ( Closure $task ): ? Future Shall schedule task for execution in parallel. public function parallel\Runtime::run ( Closure $task , ar ... otes) execute a limited set of instructions Instructions prohibited in Closures intended for parallel execution are: yield use by-reference declare class declare named function 注意 : Nested closures may yield or use by-reference, but must not conta ... haracteristics Arguments must not: contain references contain resources contain internal objects (see notes) 注意 : In the case of file stream resources, the resource will be cast to the file descriptor and passed as int where possible, this is unsup ... ported on Windows. Internal Objects Notes Internal objects generally use a custom structure which cannot be copied by value safely, PHP currently lacks the mechanics to do this (without serializa ...
https://man.mtool.work/php/8.3/parallel-runtime.run.html
parallel\run — Execution | PHP 8.3 10322
parallel\run (1.0.0) parallel\run — Execution 説明 function parallel\run ( Closure $task ): ? Future Shall schedule task for execution in parallel. function parallel\run ( Closure $task , array $argv ): ? Future Shall schedule task for exec ... c Scheduling If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime . 注意 : \paralle ... l\Runtime objects created by the programmer are not used for automatic scheduling. パラメータ task A Closure with specific characteristics. argv An array of arguments with specif ... haracteristics Arguments must not: contain references contain resources contain internal objects (see notes) 注意 : In the case of file stream resources, the resource will be cast to the file descriptor and passed as int where possible, this is unsup ...
https://man.mtool.work/php/8.3/parallel.run.html
MongoDB\Driver\Manager::__construct — Create new MongoDB Manager | PHP 8.3 10187
MongoDB\Driver\Manager::__construct (mongodb >=1.0.0) MongoDB\Driver\Manager::__construct — Create new MongoDB Manager 説明 final public function MongoDB\Driver\Manager::__construct ( ? string $uri = null , ? array $uriOptions = null , ? ar ... able the tls option or don't specify any TLS options. 注意 : On Unix platforms, the extension is sensitive to scripts that use the fork() system call without also calling exec(). Users are advised not to re-use MongoDB\Driver\Manager instances in a ... forked child process. パラメータ uri A » mongodb:// connection URI: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[defaultAuthDb][?options]] Defaults to "mongodb://127.0. ... nnection before timing out. Defaults to 10,000 milliseconds. directConnection bool This option can be used to control replica set discovery behavior when only a single host is provided in the connection string. By default, providing a single member i ...
https://man.mtool.work/php/8.3/mongodb-driver-manager.construct.html
Pdo\Odbc クラス | PHP 8.3 10080
Pdo\Odbc クラス (PHP 8 >= 8.4.0) はじめに ODBC PDO ドライバによる接続を示す PDO サブクラスです。 クラス概要 namespace Pdo ; class Odbc extends PDO { /* 継承した定数 */ public const int PDO::PARAM_NULL ; public const int PDO::PARAM_BOOL = 5 ... RSION ; public const int PDO::ATTR_SERVER_INFO ; public const int PDO::ATTR_CONNECTION_STATUS ; public const int PDO::ATTR_CASE ; public const int PDO::ATTR_CURSOR_NAME ; public const int PDO::ATTR_CURSOR ; public const int PDO::ATTR_ORACLE_NULLS ; p ... ::ERRMODE_SILENT ; public const int PDO::ERRMODE_WARNING ; public const int PDO::ERRMODE_EXCEPTION ; public const int PDO::CASE_NATURAL ; public const int PDO::CASE_LOWER ; public const int PDO::CASE_UPPER ; public const int PDO::NULL_NATURAL ; publi ... CH_ORI_REL ; public const int PDO::CURSOR_FWDONLY ; public const int PDO::CURSOR_SCROLL ; /* 定数 */ public const int ATTR_USE_CURSOR_LIBRARY ; public const int ATTR_ASSUME_UTF8 ; public const int SQL_USE_IF_NEEDED ; public const int SQL_USE_DRIVER ...
https://man.mtool.work/php/8.3/class.pdo-odbc.html
WinCache 統計スクリプト | PHP 8.3 9701
WinCache 統計スクリプト WinCache のインストールパッケージには wincache.php という PHP スクリプトが含まれています。 これを使えば、キャッシュ情報や統計情報を取得することができます。 WinCache 拡張モジュールのインストールを Microsoft Web Platfo ... の配下のサブフォルダにこのファイルをコピーします。 スクリプトを保護するために、このファイルをテキストエディタで開いて、定数 USERNAME と PASSWORD の値を変更しましょう。サーバー上で何らかの IIS 認証を有効にしている場合は、 コメントに書かれている指示に従 ... 認証設定 <?php /** * ======================== CONFIGURATION SETTINGS ============================== * If you do not want to use authentication for this page, set USE_AUTHENTICATION to 0. * If you use authentication then replace the default password. ... onfigured to support/use * any other kind of authentication like Basic/Negotiate/Digest etc, this will not work. * In that case use the array below to define the names of users in your * domain/network/workgroup which you want to grant access to. */ ...
https://man.mtool.work/php/8.3/wincache.stats.html
PREV 1 2 3 4 5 6 7 NEXT