Results of 1 - 10 of about 95 for self (0.001 sec.)
- 例 | PHP 8.3 12586
- 例 例1 基本的な、値を限定する例 <?php enum SortOrder { case Asc ; case Desc ; } function query ( $fields , $filter , SortOrder $order = SortOrder :: Asc ) { /* ... */ } query() 関数は、 $order が SortOrder::Asc または SortOrder::Desc である
... ive = 'A' ; case Suspended = 'S' ; case CanceledByUser = 'C' ; public function label (): string { return match ( $this ) { self :: Pending => 'Pending' , self :: Active => 'Active' , self :: Suspended => 'Suspended' , self :: CanceledByUser => 'Cance ... tive = 'A' ; case Suspended = 'S' ; case CanceledByUser = 'C' ; public function label (): string { return match( $this ) { self :: Pending => 'Pending' , self :: Active => 'Active' , self :: Suspended => 'Suspended' , self :: CanceledByUser => 'Cance ... , htmlentities ( $case -> label ()) ); } 他のマニュアルの関連ページ Python enum Python enum Django fields Linux JM pthread_self(3) Python dataclasses FastAPI パスパラメータ ...
-
https://man.mtool.work/php/8.3/language.enumerations.examples.html
- mcrypt_module_self_test — 指定したモジュールのセルフテストを実行する | PHP 8.3 11045
- mcrypt_module_self_test (PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0) mcrypt_module_self_test — 指定したモジュールのセルフテストを実行する 警告 この関数は PHP 7.1.0 で 非推奨 となり、PHP 7.2.0 で 削除 されました。この関数に頼
... らないことを強く推奨します。 説明 function mcrypt_module_self_test ( string $algorithm , string $lib_dir = ? ): bool この関数は、指定したアルゴリズムのセルフテストを実行します。 パラメ ... モジュールの位置を指定することが可能です。 戻り値 成功した場合 0 、失敗した場合に負の int を返します。 例 例1 mcrypt_module_self_test() の例 <?php var_dump ( mcrypt_module_self_test ( MCRYPT_RIJNDAEL_128 )) . "\n" ; var_dump ( mcrypt_module_self_test ...
-
https://man.mtool.work/php/8.3/function.mcrypt-module-self-test.html
- クラス定数 | PHP 8.3 10506
- クラス定数 定数 をクラス内に定義することができます。 クラス定数のデフォルトのアクセス範囲は public です。 注意 : クラス定数は、子クラスで再定義することもできます。 PHP 8.1.0 以降では、 final として定義されたクラス定数は、子クラスで再定義でき
... ます。 インターフェイスについてのドキュメント で例を御覧ください。 変数を用いてクラスを参照することも可能です。 変数の値に ( self や parent 、 static といった) キーワードを指定することはできません。 クラス定数はクラス単位で割り当てられるものです。インス ... に限ります。 例1 定数の定義と使用 <?php class MyClass { const CONSTANT = 'constant value' ; function showConstant () { echo self :: CONSTANT . "\n" ; } } echo MyClass :: CONSTANT . "\n" ; $classname = "MyClass" ; echo $classname :: CONSTANT . "\n" ; $ ... ss; // foo\bar } ?> 例3 クラス内での定数式の例 <?php const ONE = 1 ; class foo { const TWO = ONE * 2 ; const THREE = ONE + self :: TWO ; const SENTENCE = 'The value of THREE is ' . self :: THREE ; } ?> 例4 PHP 7.1.0 以降の、クラス定数のアクセス範囲 < ...
-
https://man.mtool.work/php/8.3/language.oop5.constants.html
- 列挙型と static メソッド | PHP 8.3 9874
- 列挙型と static メソッド 列挙型は、static メソッドを持つこともできます。 列挙型で static メソッドを使う主な理由は、 コンストラクタの代わりをさせるためです。たとえば、以下のようなものです: <?php enum Size { case Small ; case Medium ; case La
... rge ; public static function fromLength ( int $cm ): self { return match ( true ) { $cm < 50 => self :: Small , $cm < 100 => self :: Medium , default => self :: Large , }; } } var_ ...
-
https://man.mtool.work/php/8.3/language.enumerations.static-methods.html
- mcrypt_enc_self_test — オープンしたモジュールのセルフテストを実行する | PHP 8.3 9782
- mcrypt_enc_self_test (PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0) mcrypt_enc_self_test — オープンしたモジュールのセルフテストを実行する 警告 この関数は PHP 7.1.0 で 非推奨 となり、PHP 7.2.0 で 削除 されました。この関数に頼ら
... ないことを強く推奨します。 説明 function mcrypt_enc_self_test ( resource $td ): int この関数は、記述子 td で指定したアルゴリズムの セルフテストを実行します。 パラメータ td 暗号化記 ... 述子。 戻り値 成功したときは 0 を返し、 失敗したときは負の int を返します。 他のマニュアルの関連ページ Linux JM pthread_self(3) Python builtins Django instances Python audit_events Django filters Python newtypes_tutorial ...
-
https://man.mtool.work/php/8.3/function.mcrypt-enc-self-test.html
- 暗号化フィルタ | PHP 8.3 9321
- 暗号化フィルタ 暗号化フィルタは、ファイル/ストリーム を暗号化する場合に特に有用です。 mcrypt.* と mdecrypt.* 警告 この機能は PHP 7.1.0 で 非推奨 になります。この機能に頼らないことを強く推奨します。 mcrypt.* と mdecrypt.* は、libmcrypt を用い
... $KEY_SIZES = array( 'AES-128' => 16 , 'AES-192' => 24 , 'AES-256' => 32 ); protected static function key_size () { return self :: $KEY_SIZES [ 'AES-128' ]; } //default AES-128 public static function encryptFile ( $password , $input_stream , $aes_fil ... = mcrypt_create_iv ( $iv_size , MCRYPT_DEV_URANDOM )); $ekey = hash_pbkdf2 ( "sha256" , $password , $esalt , $it = 1000 , self :: key_size (), $raw = true ); $opts = array( 'mode' => 'cbc' , 'iv' => $iv , 'key' => $ekey ); stream_filter_append ( $fc ... ( $fc , str_repeat ( chr ( $padding ), $padding ) ); //perform PKCS7 padding fclose ( $fin ); fclose ( $fc ); $hmac_raw = self :: calculate_hmac_after_32bytes ( $password , $hmac_salt , $aes_filename ); $fc = fopen ( $aes_filename , "rb+" ); fwrite ...
-
https://man.mtool.work/php/8.3/filters.encryption.html
- 遅延静的束縛 (Late Static Bindings) | PHP 8.3 9044
- 遅延静的束縛 (Late Static Bindings) PHP には、遅延静的束縛と呼ばれる機能が搭載されています。 これを使用すると、静的継承のコンテキストで呼び出し元のクラスを参照できるようになります。 より正確に言うと、遅延静的束縛は直近の "非転送コール" のク
... 演算子の左側に書かれたもの) となります。staticメソッド以外の場合は、そのオブジェクトのクラスとなります。 "転送コール" とは、 self:: や parent:: 、 static:: による :: 演算子を使ったコール。 あるいはクラス階層の中での forward_static_call() によるコールの ... tatic binding)" の由来は、 staticメソッドのコールに使用できることによります (ただし、staticメソッド以外でも使用可能です)。 self:: の制限 self:: あるいは __CLASS__ による現在のクラスへの静的参照は、 そのメソッドが属するクラス (つまり、 そのメソッドが定 ... 義されているクラス) に解決されます。 例1 self:: の使用例 <?php class A { public static function who () { echo __CLASS__ ; } public static function test () { self :: who ...
-
https://man.mtool.work/php/8.3/language.oop5.late-static-bindings.html
- Lua::call — Lua 関数を呼び出す | PHP 8.3 9044
- Lua::call Lua::__call (PECL lua >=0.9.0) Lua::call -- Lua::__call — Lua 関数を呼び出す 説明 public function Lua::call ( callable $lua_func , array $args = ? , int $use_self = 0 ): mixed public function Lua::__call ( callable $lua_func , arr
... ay $args = ? , int $use_self = 0 ): mixed 警告 この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。 パラメータ lua_fu ... nc lua での関数名 args Lua 関数に渡される引数 use_self self を使うか否か 戻り値 呼び出した関数の結果を返します。引数が間違っている場合は null 、 それ以外のエラーの場合は false を ...
-
https://man.mtool.work/php/8.3/lua.call.html
- PHP/FFI/事前ロードの完全な例 | PHP 8.3 8504
- PHP/FFI/事前ロードの完全な例 php.ini ffi.enable=preload opcache.preload=preload.php preload.php <?php FFI :: load ( __DIR__ . "/dummy.h" ); opcache_compile_file ( __DIR__ . "/dummy.php" ); ?> dummy.h #define FFI_SCOPE "DUMMY" #define FFI_LI
... r *format, ...); dummy.php <?php final class Dummy { private static $ffi = null ; function __construct () { if ( is_null ( self :: $ffi )) { self :: $ffi = FFI :: scope ( "DUMMY" ); } } function printf ( $format , ... $args ) { return (int) self :: $ ...
-
https://man.mtool.work/php/8.3/ffi.examples-complete.html
- ReflectionFunctionAbstract::getClosureCalledClass — クロージャ内部で static:: ... 8136
- ReflectionFunctionAbstract::getClosureCalledClass (PHP 8 >= 8.0.23, PHP 8 >= 8.1.11) ReflectionFunctionAbstract::getClosureCalledClass — クロージャ内部で static:: に対応するクラスを返す 説明 public function ReflectionFunctionAbstract::getCl
... ectionFunctionAbstract::getClosureThis() の違いを示しています。 <?php class A { public function getClosure () { var_dump ( self ::class, static::class); return function() {}; } } class B extends A {} $b = new B (); $c = $b -> getClosure (); $r = new ... == $b, since a non-static closure take the object context var_dump ( $r -> getClosureScopeClass ()); // Corresponds to the self::class resolution inside a closure var_dump ( $r -> getClosureCalledClass ()); // Corresponds to the static::class resolut ... ectionFunctionAbstract::getClosureThis() の違いを示しています。 <?php class A { public function getClosure () { var_dump ( self ::class, static::class); return static function() {}; } } class B extends A {} $b = new B (); $c = $b -> getClosure (); $r ...
-
https://man.mtool.work/php/8.3/reflectionfunctionabstract.getclosurecalledclass....