相关疑难解决方法(0)

在php5中使用内联字符串与串联的速度差异?

(假设php5)考虑

<?php

    $foo = 'some words';

    //case 1
    print "these are $foo";

    //case 2
    print "these are {$foo}";

    //case 3
    print 'these are ' . $foo;
?>
Run Code Online (Sandbox Code Playgroud)

1和2之间有很大差异吗?

如果没有,那么在1/2和3之间呢?

php optimization performance

46
推荐指数
6
解决办法
2万
查看次数

标签 统计

optimization ×1

performance ×1

php ×1