php的explode()和split()的区别
都是分割,区别就是,split要用转移字符:
1.
$test = end(explode('.', 'abc.txt'));
echo $test;//output txt
$test = end(explode('.', 'abc.txt'));
echo $test;//output txt
2.
$test1 = end(split('.','abc.txt'));
echo $test1;//no output
$test1 = end(split('.','abc.txt'));
echo $test1;//no output
3.
$test1 = end(split('\.','abc.txt'));
echo $test1;//output txt
$test1 = end(split('\.','abc.txt'));
echo $test1;//output txt