« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 12 for TestCase (0.003 sec.)
get_class_vars — クラスのデフォルトプロパティを取得する | PHP 8.3 11638
get_class_vars (PHP 4, PHP 5, PHP 7, PHP 8) get_class_vars — クラスのデフォルトプロパティを取得する 説明 function get_class_vars ( string $class ): array 指定したクラスのデフォルトプロパティを取得します。 パラメータ class クラス名。 戻り値 ... s() でのスコープの挙動 <?php function format ( $array ) { return implode ( '|' , array_keys ( $array )) . "\r\n" ; } class TestCase { public $a = 1 ; protected $b = 2 ; private $c = 3 ; public static function expose () { echo format ( get_class_vars ( __ ... CLASS__ )); } } TestCase :: expose (); echo format ( get_class_vars ( 'TestCase' )); ?> 上の例の出力は以下となります。 // 5.0.0 a| * b| TestCase c ... a| * b| TestCase c // 5.0.1 - 5.0.2 a|b|c a|b|c // 5.0.3 + a|b|c a 参考 get_class_methods() - クラスメソッドの名前を取得する get_object_var ...
https://man.mtool.work/php/8.3/function.get-class-vars.html
ctype_alnum — 英数字かどうかを調べる | PHP 8.3 9958
ctype_alnum (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_alnum — 英数字かどうかを調べる 説明 function ctype_alnum ( mixed $text ): bool 与えられた文字列 text のすべての文字が英字または 数字であるかどうかを調べます。 パラメータ text 調べる文字 ... type_alnum() の例 (デフォルトのロケールを使用) <?php $strings = array( 'AbCd1zyZ9' , 'foo!#$bar' ); foreach ( $strings as $testcase ) { if ( ctype_alnum ( $testcase )) { echo "The string $testcase consists of all letters or digits.\n" ; } else { echo "Th ... e string $testcase does not consist of all letters or digits.\n" ; } } ?> 上の例の出力は以下となります。 The string AbCd1zyZ9 consists of all ...
https://man.mtool.work/php/8.3/function.ctype-alnum.html
ctype_lower — 小文字かどうかを調べる | PHP 8.3 9958
ctype_lower (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_lower — 小文字かどうかを調べる 説明 function ctype_lower ( mixed $text ): bool text のすべての文字が小文字だった場合に true 、そうでない場合に false を返します。 パラメータ text 調べる ... er() の例(デフォルトのロケールを利用) <?php $strings = array( 'aac123' , 'qiutoas' , 'QASsdks' ); foreach ( $strings as $testcase ) { if ( ctype_lower ( $testcase )) { echo "The string $testcase consists of all lowercase letters.\n" ; } else { echo "Th ... e string $testcase does not consist of all lowercase letters.\n" ; } } ?> 上の例の出力は以下となります。 The string aac123 does not consist o ...
https://man.mtool.work/php/8.3/function.ctype-lower.html
ctype_punct — 空白、英数字以外の出力可能な文字かどうかを調べる | PHP 8.3 9958
ctype_punct (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_punct — 空白、英数字以外の出力可能な文字かどうかを調べる 説明 function ctype_punct ( mixed $text ): bool 与えられた文字列 text のすべての文字が 句読点であるかどうかを調べます。 パラメー ... になります。 例 例1 ctype_punct() の例 <?php $strings = array( 'ABasdk!@!$#' , '!@ # $' , '*&$()' ); foreach ( $strings as $testcase ) { if ( ctype_punct ( $testcase )) { echo "The string $testcase consists of all punctuation.\n" ; } else { echo "The stri ... ng $testcase does not consist of all punctuation.\n" ; } } ?> 上の例の出力は以下となります。 The string ABasdk!@!$# does not consist of ...
https://man.mtool.work/php/8.3/function.ctype-punct.html
ctype_upper — 大文字かどうか調べる | PHP 8.3 9958
ctype_upper (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_upper — 大文字かどうか調べる 説明 function ctype_upper ( mixed $text ): bool 与えられた文字列 text のすべての文字が 大文字であるかどうかを調べます。 パラメータ text 調べる文字列。 注意 ... () の例(デフォルトのロケールを利用) <?php $strings = array( 'AKLWC139' , 'LMNSDO' , 'akwSKWsm' ); foreach ( $strings as $testcase ) { if ( ctype_upper ( $testcase )) { echo "The string $testcase consists of all uppercase letters.\n" ; } else { echo "Th ... e string $testcase does not consist of all uppercase letters.\n" ; } } ?> 上の例の出力は以下となります。 The string AKLWC139 does not consist ...
https://man.mtool.work/php/8.3/function.ctype-upper.html
ctype_xdigit — 16 進数を表す文字かどうかを調べる | PHP 8.3 9958
ctype_xdigit (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_xdigit — 16 進数を表す文字かどうかを調べる 説明 function ctype_xdigit ( mixed $text ): bool 与えられた文字列 text のすべての文字が 16 進の '数字' であるかどうかを調べます。 パラメータ ... になります。 例 例1 ctype_xdigit() の例 <?php $strings = array( 'AB10BC99' , 'AR1012' , 'ab12bc99' ); foreach ( $strings as $testcase ) { if ( ctype_xdigit ( $testcase )) { echo "The string $testcase consists of all hexadecimal digits.\n" ; } else { echo " ... The string $testcase does not consist of all hexadecimal digits.\n" ; } } ?> 上の例の出力は以下となります。 The string AB10BC99 consists of all ...
https://man.mtool.work/php/8.3/function.ctype-xdigit.html
ctype_alpha — 英字かどうかを調べる | PHP 8.3 9392
ctype_alpha (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_alpha — 英字かどうかを調べる 説明 function ctype_alpha ( mixed $text ): bool 与えられた文字列 text のすべての文字が 英字であるかどうかを調べます。 標準の C ロケールの場合、文字は [A-Za ... 例 例1 ctype_alpha() の例 (デフォルトのロケールを使用) <?php $strings = array( 'KjgWZC' , 'arf12' ); foreach ( $strings as $testcase ) { if ( ctype_alpha ( $testcase )) { echo "文字列 $testcase は全て文字からなります。\n" ; } else { echo "文字列 $testcase ...
https://man.mtool.work/php/8.3/function.ctype-alpha.html
ctype_digit — 数字かどうかを調べる | PHP 8.3 9392
ctype_digit (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_digit — 数字かどうかを調べる 説明 function ctype_digit ( mixed $text ): bool 与えられた文字列 text のすべての文字が 数字であるかどうかを調べます。 パラメータ text 調べる文字列。 注意 : ... se になります。 例 例1 ctype_digit() の例 <?php $strings = array( '1820.20' , '10002' , 'wsl!12' ); foreach ( $strings as $testcase ) { if ( ctype_digit ( $testcase )) { echo "The string $testcase consists of all digits.\n" ; } else { echo "The string $t ...
https://man.mtool.work/php/8.3/function.ctype-digit.html
ctype_cntrl — 制御文字かどうかを調べる | PHP 8.3 6597
ctype_cntrl (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_cntrl — 制御文字かどうかを調べる 説明 function ctype_cntrl ( mixed $text ): bool 与えられた文字列 text のすべての文字が制御文字であるかどうかを調べます。 制御文字とは、例えばラインフィ ... ctype_cntrl() の例 <?php $strings = array( 'string1' => "\n\r\t" , 'string2' => 'arf12' ); foreach ( $strings as $name => $testcase ) { if ( ctype_cntrl ( $testcase )) { echo "The string ' $name ' consists of all control characters.\n" ; } else { echo "T ...
https://man.mtool.work/php/8.3/function.ctype-cntrl.html
ctype_graph — 空白以外の印字可能な文字かどうかを調べる | PHP 8.3 6402
ctype_graph (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_graph — 空白以外の印字可能な文字かどうかを調べる 説明 function ctype_graph ( mixed $text ): bool 与えられた文字列 text のすべての文字が 実際に目に見える出力を行うかどうかを調べます。 パ ... gs = array( 'string1' => "asdf\n\r\t" , 'string2' => 'arf12' , 'string3' => 'LKA#@%.54' ); foreach ( $strings as $name => $testcase ) { if ( ctype_graph ( $testcase )) { echo "The string ' $name ' consists of all (visibly) printable characters.\n" ; } el ...
https://man.mtool.work/php/8.3/function.ctype-graph.html
PREV 1 2 NEXT