Results of 1 - 10 of about 151 for apple (0.001 sec.)
- ReflectionClass::getMethods — メソッドの配列を取得する | PHP 8.3 11260
- ReflectionClass::getMethods (PHP 5, PHP 7, PHP 8) ReflectionClass::getMethods — メソッドの配列を取得する 説明 public function ReflectionClass::getMethods ( ? int $filter = null ): array クラスのメソッドの配列を取得します。 パラメータ filter
... バージョン 説明 7.2.0 filter は、nullable になりました。 例 例1 ReflectionClass::getMethods() の基本的な使用例 <?php class Apple { public function firstMethod () { } final protected function secondMethod () { } private static function thirdMethod () { ... } } $class = new ReflectionClass ( 'Apple' ); $methods = $class -> getMethods (); var_dump ( $methods ); ?> 上の例の出力は以下となります。 array(3) { [0]=> object(R ... eflectionMethod)#2 (2) { ["name"]=> string(11) "firstMethod" ["class"]=> string(5) "Apple" } [1]=> object(ReflectionMethod)#3 (2) { ["name"]=> string(12) "secondMethod" ["class"]=> string(5) "Apple" } [2]=> objec ...
-
https://man.mtool.work/php/8.3/reflectionclass.getmethods.html
- ReflectionClassConstant::getAttributes — アトリビュートを取得する | PHP 8.3 10501
- ReflectionClassConstant::getAttributes (PHP 8) ReflectionClassConstant::getAttributes — アトリビュートを取得する 説明 public function ReflectionClassConstant::getAttributes ( ? string $name = null , int $flags = 0 ): array このクラス定数上で
... 的な使い方 <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } class Basket { #[ Fruit ] #[ Red ] public const APPLE = 'apple' ; } $classConstant = new ReflectionClassConstant ( 'Basket' , 'APPLE' ); $attributes = $classConstant -> getAttr ... ィルタする <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } class Basket { #[ Fruit ] #[ Red ] public const APPLE = 'apple' ; } $classConstant = new ReflectionClassConstant ( 'Basket' , 'APPLE' ); $attributes = $classConstant -> getAttr ... Attribute ] class Fruit { } #[ Attribute ] class Red implements Color { } class Basket { #[ Fruit ] #[ Red ] public const APPLE = 'apple' ; } $classConstant = new ReflectionClassConstant ( 'Basket' , 'APPLE' ); $attributes = $classConstant -> getAttr ...
-
https://man.mtool.work/php/8.3/reflectionclassconstant.getattributes.html
- ReflectionProperty::getAttributes — アトリビュートを取得する | PHP 8.3 10501
- ReflectionProperty::getAttributes (PHP 8) ReflectionProperty::getAttributes — アトリビュートを取得する 説明 public function ReflectionProperty::getAttributes ( ? string $name = null , int $flags = 0 ): array このクラスプロパティで宣言されて
... な使い方 <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } class Basket { #[ Fruit ] #[ Red ] public string $apple = 'apple' ; } $property = new ReflectionProperty ( 'Basket' , 'apple' ); $attributes = $property -> getAttributes (); prin ... ルタする <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } class Basket { #[ Fruit ] #[ Red ] public string $apple = 'apple' ; } $property = new ReflectionProperty ( 'Basket' , 'apple' ); $attributes = $property -> getAttributes ( 'Fruit ... ttribute ] class Fruit { } #[ Attribute ] class Red implements Color { } class Basket { #[ Fruit ] #[ Red ] public string $apple = 'apple' ; } $property = new ReflectionProperty ( 'Basket' , 'apple' ); $attributes = $property -> getAttributes ( 'Color ...
-
https://man.mtool.work/php/8.3/reflectionproperty.getattributes.html
- DOMNode::getNodePath — ノードの XPath を取得する | PHP 8.3 10163
- DOMNode::getNodePath (PHP 5 >= 5.2.0, PHP 7, PHP 8) DOMNode::getNodePath — ノードの XPath を取得する 説明 public function DOMNode::getNodePath (): ? string ノードの XPath ロケーションパスを取得します。 パラメータ この関数にはパラメータはあり
... // 新しい DOMDocument インスタンスを作ります $dom = new DOMDocument ; // XML を読み込みます $dom -> loadXML ( ' <fruits> <apples> <apple>braeburn</apple> <apple>granny smith</apple> </apples> <pears> <pear>conference</pear> </pears> </fruits> ' ); // ... tsByTagName ( '*' ) as $node ) { echo $node -> getNodePath () . "\n" ; } ?> 上の例の出力は以下となります。 /fruits /fruits/apples /fruits/apples/apple[1] /fruits/apples/apple[2] /fruits/pears /fruits/pears/pear 参考 DOMXPath 他のマニュアルの関連ページ ...
-
https://man.mtool.work/php/8.3/domnode.getnodepath.html
- array_is_list — 指定された配列がリストかどうかをチェックする | PHP 8.3 10163
- array_is_list (PHP 8 >= 8.1.0) array_is_list — 指定された配列がリストかどうかをチェックする 説明 function array_is_list ( array $array ): bool 指定された array がリストかどうかを判定します。 配列のキーが連続した数値 ( 0 から count($array)-1
... lse を返します。 例 例1 array_is_list() example <?php var_dump ( array_is_list ([])); // true var_dump ( array_is_list ([ 'apple' , 2 , 3 ])); // true var_dump ( array_is_list ([ 0 => 'apple' , 'orange' ])); // true // 配列が 0 から始まっていない場合 ... var_dump ( array_is_list ([ 1 => 'apple' , 'orange' ])); // false // キーの順序が正しくない場合 var_dump ( array_is_list ([ 1 => 'apple' , 0 => 'orange' ])); // f ... alse // キーが数値でない場合 var_dump ( array_is_list ([ 0 => 'apple' , 'foo' => 'bar' ])); // false // Non-consecutive keys // 数値のキーが連続していない場合 var_dump ( array_is_list ([ 0 => ...
-
https://man.mtool.work/php/8.3/function.array-is-list.html
- ReflectionClassConstant::isDeprecated — クラス定数が非推奨かどうかを調べる | PH... 8564
- ReflectionClassConstant::isDeprecated (PHP 8 >= 8.4.0) ReflectionClassConstant::isDeprecated — クラス定数が非推奨かどうかを調べる 説明 public function ReflectionClassConstant::isDeprecated (): bool クラス定数が非推奨かどうかを調べます。 パラ
... 返します。 例 例1 ReflectionClassConstant::isDeprecated() の例 <?php class Basket { #[ \Deprecated ( message : 'use Basket::APPLE instead' )] public const APLE = 'apple' ; public const APPLE = 'apple' ; } $classConstant = new ReflectionClassConstant ( ...
-
https://man.mtool.work/php/8.3/reflectionclassconstant.isdeprecated.html
- ReflectionClass::getAttributes — アトリビュートを取得する | PHP 8.3 8483
- ReflectionClass::getAttributes (PHP 8) ReflectionClass::getAttributes — アトリビュートを取得する 説明 public function ReflectionClass::getAttributes ( ? string $name = null , int $flags = 0 ): array このクラスで宣言されている全てのアトリビュ
... 返します。 例 例1 基本的な使用法 <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } #[ Fruit ] #[ Red ] class Apple { } $class = new ReflectionClass ( 'Apple' ); $attributes = $class -> getAttributes (); print_r ( array_map (fn( $attribut ... 2 クラス名で結果をフィルタする <?php #[ Attribute ] class Fruit { } #[ Attribute ] class Red { } #[ Fruit ] #[ Red ] class Apple { } $class = new ReflectionClass ( 'Apple' ); $attributes = $class -> getAttributes ( 'Fruit' ); print_r ( array_map (fn( ... interface Color { } #[ Attribute ] class Fruit { } #[ Attribute ] class Red implements Color { } #[ Fruit ] #[ Red ] class Apple { } $class = new ReflectionClass ( 'Apple' ); $attributes = $class -> getAttributes ( Color ::class, ReflectionAttribute : ...
-
https://man.mtool.work/php/8.3/reflectionclass.getattributes.html
- PDOStatement::fetchAll — 結果セットから、残っている行を取得する | PHP 8.3 8063
- PDOStatement::fetchAll (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo >= 0.1.0) PDOStatement::fetchAll — 結果セットから、残っている行を取得する 説明 public function PDOStatement::fetchAll ( int $mode = PDO::FETCH_DEFAULT ): array public function P
... 出力は、 たとえば以下のようになります。 Fetch all of the remaining rows in the result set: Array ( [0] => Array ( [name] => apple [0] => apple [colour] => red [1] => red ) [1] => Array ( [name] => pear [0] => pear [colour] => green [1] => green ) [2] = ... ETCH_COLUMN , 0 ); var_dump ( $result ); ?> 上の例の出力は、 たとえば以下のようになります。 Array(3) ( [0] => string(5) => apple [1] => string(4) => pear [2] => string(10) => watermelon ) 例3 単一カラムによる全ての値のグループ化 以下の例は、どのように ... 果セット中の特定のカラムの値によって グループ化された連想配列を返すかを例示しています。 その配列は 3 つのキーを有します。値 apple 、 pear は異なる 2 つの異なる色を有する配列として返され、 一方 watermelon は 1 つの色のみ有する配列として返されます。 <?ph ...
-
https://man.mtool.work/php/8.3/pdostatement.fetchall.html
- 配列演算子 | PHP 8.3 7643
- 配列演算子 Array Operators 例 名前 結果 $a + $b 結合 $a および $b を結合する。 $a == $b 同等 $a および $b のキー/値のペアが等しい場合に true 。 $a === $b 同一 $a および $b のキー/値のペアが等しく、その並び順が等しく、 かつデータ型も等しい場
... は左側の配列の要素が優先され、 右側の配列にあった同じキーの要素は無視されます。 例1 配列結合演算子 <?php $a = array( "a" => "apple" , "b" => "banana" ); $b = array( "a" => "pear" , "b" => "strawberry" , "c" => "cherry" ); $c = $a + $b ; // Union of $a a ... of \$a += \$b: \n" ; var_dump ( $a ); ?> 上の例の出力は以下となります。 Union of $a and $b: array(3) { ["a"]=> string(5) "apple" ["b"]=> string(6) "banana" ["c"]=> string(6) "cherry" } Union of $b and $a: array(3) { ["a"]=> string(4) "pear" ["b"]=> s ... tring(10) "strawberry" ["c"]=> string(6) "cherry" } Union of $a += $b: array(3) { ["a"]=> string(5) "apple" ["b"]=> string(6) "banana" ["c"]=> string(6) "cherry" } 同じキーと値を保持している場合に、配列が等しいとみなされます。 例 ...
-
https://man.mtool.work/php/8.3/language.operators.array.html
- MessageFormatter::formatMessage — 手早くメッセージをフォーマットする | PHP 8.3 7643
- MessageFormatter::formatMessage msgfmt_format_message (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) MessageFormatter::formatMessage -- msgfmt_format_message — 手早くメッセージをフォーマットする 説明 オブジェクト指向型 public static fun
... inal, one {#st} two {#nd} few {#rd} other {#th}}!' , [ 'place' => 3 ]), "\n" ; echo msgfmt_format_message ( "en" , "There {apple, plural, =0 {are no apples} =1 {is one apple...} other {are # apples!} }" , [ 'apple' => 0 ] ), "\n" ; 例2 オブジェクト指向 ... st} two {#nd} few {#rd} other {#th}}!' , [ 'place' => 3 ]), "\n" ; echo MessageFormatter :: formatMessage ( "en" , "There {apple, plural, =0 {are no apples} =1 {is one apple...} other {are # apples!} }" , [ 'apple' => 0 ] ), "\n" ; 上の例の出力は以下と ... 23 trees make 37.073 monkeys per tree 4.560 Affen auf 123 Bäumen sind 37,073 Affen pro Baum You finished 3rd! There are no apples 例3 通常の通貨記号と、短い形式の通貨記号を使ってフォーマットするよう、ICU に指示する ICU ≥ 67 が必要です <?php echo msgfm ...
-
https://man.mtool.work/php/8.3/messageformatter.formatmessage.html