|
str_contains指定された部分文字列が、文字列に含まれるかを調べる 説明
bool str_contains(string
$haystack , string $needle )
パラメータ
戻り値
例
例1 空文字列
<?php 上の例の出力は以下となります。 Checking the existence of the empty string will always return true 例2 大文字小文字の区別
<?php 上の例の出力は以下となります。 The string 'lazy' was found in the string "Lazy" was not found because the case does not match 注意
参考
|