在perl和php中使用substr相同代码,不同结果。
php:
1 2 3 4 |
|
编译错误: Can't use function return value in write context
perl:
1 2 3 4 56 |
|
结果:2009-04-13 12:00:00
perl中的substr可以截取替换,php可以用substr_replace函数替换。
php的substr_replace函数使用:
1 2 3 4 |
|
在perl和php中使用substr相同代码,不同结果。
php:
1 2 3 4 |
|
编译错误: Can't use function return value in write context
perl:
1 2 3 4 56 |
|
结果:2009-04-13 12:00:00
perl中的substr可以截取替换,php可以用substr_replace函数替换。
php的substr_replace函数使用:
1 2 3 4 |
|