« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 120 for strlen (0.001 sec.)
strlen — 文字列の長さを得る | PHP 8.3 11387
strlen (PHP 4, PHP 5, PHP 7, PHP 8) strlen — 文字列の長さを得る 説明 function strlen ( string $string ): int 与えられた string の長さを返します。 パラメータ string 長さを調べる文字列。 戻り値 string の長さをバイト単位で返します。 例 例1 strlen ... len() の例 <?php $str = 'abcdef' ; echo strlen ( $str ), PHP_EOL ; // 6 $str = ' ab cd ' ; echo strlen ( $str ), PHP_EOL ; // 7 ?> 注意 注意 : strlen() が返すのはバイト数 ... であり、 文字数ではありません。 参考 count() - 配列または Countable オブジェクトに含まれるすべての要素の数を数える grapheme_strlen() - 書記素単位で文字列の長さを取得する iconv_strlen() - 文字列の文字数を返す mb_strlen() - 文字列の長さを得る 他のマニュア ... ルの関連ページ Linux JM strlen(3) Linux JM iconv_close(3) Linux JM wc(1) Linux JM iconv_open(3) Linux JM string(3) Linux JM strrchr(3) ...
https://man.mtool.work/php/8.3/function.strlen.html
uopz_set_return — Provide a return value for an existing function | PHP 8.3 10667
uopz_set_return (PECL uopz 5, PECL uopz 6, PECL uopz 7) uopz_set_return — Provide a return value for an existing function 説明 function uopz_set_return ( string $function , mixed $value , bool $execute = false ): bool function uopz_set_retu ... he original function. 戻り値 True if succeeded, false otherwise. 例 例1 uopz_set_return() example <?php uopz_set_return ( "strlen" , 42 ); echo strlen ( "Banana" ); ?> 上の例の出力は以下となります。 42 例2 uopz_set_return() example <?php uopz_set_retur ... n ( "strlen" , function( $str ) { return strlen ( $str ) * 2 ; }, true ); echo strlen ( "Banana" ); ?> 上の例の出力は以下となります。 ... 12 例3 uopz_set_return() class example <?php class My { public static function strlen ( $arg ) { return strlen ( $arg ); } } uopz_set_return ( My ::class, "strlen" , function( $str ) { return strlen ( $str ) ...
https://man.mtool.work/php/8.3/function.uopz-set-return.html
uopz_delete — Delete a function | PHP 8.3 10518
uopz_delete (PECL uopz 1, PECL uopz 2) uopz_delete — Delete a function 警告 この関数は、PECL uopz 5.0.0 で 削除 されました。 説明 function uopz_delete ( string $function ): void function uopz_delete ( string $class , string $function ): voi ... d Deletes a function or method パラメータ class function 戻り値 例 例1 uopz_delete() example <?php uopz_delete ( "strlen" ); echo strlen ( "Hello World" ); ?> 上の例の出力は、 たとえば以下のようになります。 PHP Fatal error: Call to undefined f ... unction strlen() in /path/to/script.php on line 4 例2 uopz_delete() class example <?php class My { public static function strlen ( $arg ) ... { return strlen ( $arg ); } } uopz_delete ( My ::class, "strlen" ); echo My :: strlen ( "Hello World" ); ?> 上の例の出力は、 たとえば以下の ...
https://man.mtool.work/php/8.3/function.uopz-delete.html
uopz_rename — Rename a function at runtime | PHP 8.3 10518
uopz_rename (PECL uopz 1, PECL uopz 2) uopz_rename — Rename a function at runtime 警告 この関数は、PECL uopz 5.0.0 で 削除 されました。 説明 function uopz_rename ( string $function , string $rename ): void function uopz_rename ( string $cla ... name of an existing function rename The new name for the function 戻り値 例 例1 uopz_rename() example <?php uopz_rename ( "strlen" , "original_strlen" ); echo original_strlen ( "Hello World" ); ?> 上の例の出力は以下となります。 11 例2 uopz_rename() cla ... ss example <?php class My { public function strlen ( $arg ) { return strlen ( $arg ); } } uopz_rename ( My ::class, "strlen" , "original_strlen" ); echo My :: original_strle ... n ( "Hello World" ); ?> 上の例の出力は以下となります。 11 他のマニュアルの関連ページ Linux JM rename(1) Linux JM strlen(3) Linux JM rename(2) Docker docker rename DuckDB ALTER DATABASE Statement Docker docker container rename ...
https://man.mtool.work/php/8.3/function.uopz-rename.html
iconv_strlen — 文字列の文字数を返す | PHP 8.3 10183
iconv_strlen (PHP 5, PHP 7, PHP 8) iconv_strlen — 文字列の文字数を返す 説明 function iconv_strlen ( string $string , ? string $encoding = null ): int | false strlen() とは違い、 iconv_strlen() は与えられたバイト列 string 中に現れる文字の数を ... エラーが発生した場合は false を返します。 変更履歴 バージョン 説明 8.0.0 encoding は、nullable になりました。 参考 grapheme_strlen() - 書記素単位で文字列の長さを取得する mb_strlen() - 文字列の長さを得る strlen() - 文字列の長さを得る 他のマニュアルの関連 ... ページ Linux JM strlen(3) Linux JM iconv_close(3) Linux JM iconv(3) Linux JM iconvconfig(8) Linux JM wc(1) Linux JM realpath(3) ...
https://man.mtool.work/php/8.3/function.iconv-strlen.html
grapheme_strlen — 書記素単位で文字列の長さを取得する | PHP 8.3 9934
grapheme_strlen (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) grapheme_strlen — 書記素単位で文字列の長さを取得する 説明 手続き型 function grapheme_strlen ( string $string ): int | false | null 書記素単位 (バイト数や文字数ではありません ... ればなりません。 戻り値 成功した場合に文字列の長さを返します。 失敗した場合は null または false を返します。 例 例1 grapheme_strlen() の例 <?php $char_a_ring_nfd = "a\xCC\x8A" ; // 'LATIN SMALL LETTER A WITH RING ABOVE' (U+00E5) normalization form "D" $c ... ar_o_diaeresis_nfd = "o\xCC\x88" ; // 'LATIN SMALL LETTER O WITH DIAERESIS' (U+00F6) normalization form "D" print grapheme_strlen ( 'abc' . $char_a_ring_nfd . $char_o_diaeresis_nfd . $char_a_ring_nfd ); ?> 上の例の出力は以下となります。 6 参考 » Unicod ... e Text Segmentation: Grapheme Cluster Boundaries iconv_strlen() - 文字列の文字数を返す mb_strlen() - 文字列の長さを得る strlen() - 文字列の長さを得る 他のマニュアルの関連ページ Linux J ...
https://man.mtool.work/php/8.3/function.grapheme-strlen.html
uopz_function — Creates a function at runtime | PHP 8.3 9313
uopz_function (PECL uopz 1, PECL uopz 2) uopz_function — Creates a function at runtime 警告 この関数は、PECL uopz 5.0.0 で 削除 されました。 説明 function uopz_function ( string $function , Closure $handler , int $modifiers = ? ): void func ... ers for the function, by default copied or ZEND_ACC_PUBLIC 戻り値 例 例1 uopz_function() example <?php uopz_function ( "my_strlen" , function( $arg ) { return strlen ( $arg ); }); echo my_strlen ( "Hello World" ); ?> 上の例の出力は以下となります。 11 例 ... 2 uopz_function() class example <?php class My {} uopz_function ( My ::class, "strlen" , function( $arg ) { return strlen ( $arg ); }, ZEND_ACC_STATIC ); echo My :: strlen ( "Hello World" ); ?> 上の例の出力は ... 以下となります。 11 他のマニュアルの関連ページ Linux JM strlen(3) FastAPI Sub Applications FastAPI 環境変数 ...
https://man.mtool.work/php/8.3/function.uopz-function.html
ストリームラッパーとして登録するクラスの例 | PHP 8.3 8730
ストリームラッパーとして登録するクラスの例 以下のサンプルは、var:// プロトコルハンドラを実装し、 指定した名前のグローバル変数の読み書きを fread() のような標準のファイルシステム関数でできるようにしています。 以下で実装した var:// プロトコルで ... stream_read ( $count ) { $ret = substr ( $GLOBALS [ $this -> varname ], $this -> position , $count ); $this -> position += strlen ( $ret ); return $ret ; } function stream_write ( $data ) { $left = substr ( $GLOBALS [ $this -> varname ], 0 , $this -> p ... osition ); $right = substr ( $GLOBALS [ $this -> varname ], $this -> position + strlen ( $data )); $GLOBALS [ $this -> varname ] = $left . $data . $right ; $this -> position += strlen ( $data ); return strlen ... ( $data ); } function stream_tell () { return $this -> position ; } function stream_eof () { return $this -> position >= strlen ( $GLOBALS [ $this -> varname ]); } function stream_seek ( $offset , $whence ) { switch ( $whence ) { case SEEK_SET : if ( ...
https://man.mtool.work/php/8.3/stream.streamwrapper.example-1.html
mb_strlen — 文字列の長さを得る | PHP 8.3 8581
mb_strlen (PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8) mb_strlen — 文字列の長さを得る 説明 function mb_strlen ( string $string , ? string $encoding = null ): int 文字列の長さを取得します。 パラメータ string 長さを調べたい文字列。 encoding encoding ... が発生し、 false を返していました。 参考 mb_internal_encoding() - 内部文字エンコーディングを設定あるいは取得する grapheme_strlen() - 書記素単位で文字列の長さを取得する iconv_strlen() - 文字列の文字数を返す strlen() - 文字列の長さを得る 他のマニュアルの ... 関連ページ Linux JM strlen(3) Linux JM iconv(3) Linux JM mbsrtowcs(3) Vim mbyte Linux JM mbsnrtowcs(3) Vim usr_45 ...
https://man.mtool.work/php/8.3/function.mb-strlen.html
uopz_unset_return — Unsets a previously set return value for a function | PHP 8... 8531
uopz_unset_return (PECL uopz 5, PECL uopz 6, PECL uopz 7) uopz_unset_return — Unsets a previously set return value for a function 説明 function uopz_unset_return ( string $function ): bool function uopz_unset_return ( string $class , string ... ction function The name of the function 戻り値 True on success 例 例1 uopz_unset_return() example <?php uopz_set_return ( "strlen" , 42 ); $len = strlen ( "Banana" ); uopz_unset_return ( "strlen" ); echo $len + strlen ( "Banana" ); ?> 上の例の出力は以下 ... となります。 48 他のマニュアルの関連ページ Linux JM strlen(3) Docker 共通する問題の回避策 ...
https://man.mtool.work/php/8.3/function.uopz-unset-return.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT