测试字符串是否$str以子字符串结尾的标准PHP方法$test是:
$str
$test
$endsWith = substr( $str, -strlen( $test ) ) == $test
这是最快的方式吗?
php string performance
performance ×1
php ×1
string ×1