\$needleと\$haystackどっちが先だったっけ?
といつも記憶喪失悩まされるのでメモ
関数 | 第1引数 | 第2引数 | 第3引数 | 第4引数 | 第5引数 |
---|---|---|---|---|---|
strpos | $haystack | $needle | $offset | ||
substr_count | $haystack | $needle | $offset | $length | |
str_replace | $search | $replace | $subject | $count | |
preg_match | $pattern | $subject | $matches | $flags | $offset |
preg_replace | $pattern | $replace | $subject | $limit | $count |
preg_replace_callback | $pattern | $callback | $subject | $limit | $count |
array_search | $needle | $haystack | $strict | ||
array_filter | $array | $callback | $flag |