concat vs string中的变量 [英] concat vs variable in string

查看:80
本文介绍了concat vs string中的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



" {$ _ SERVER [''DOCUMENT_ROOT'']} / inc / mysql-connect.php"


$更有效率b $ b $ _SERVER [''DOCUMENT_ROOT'']。" /inc/mysql-connect.php"




或者它仍然可以幕后串联?我听说

串联是昂贵的......(即使在这种情况下它可以忽略不计)

解决方案

_SERVER ['' DOCUMENT_ROOT'']} / inc / mysql-connect.php"


更有效


_SERVER [''DOCUMENT_ROOT'']。 ; /inc/mysql-connect.php"




或者它仍然在幕后进行连接?我听说

串联是昂贵的......(即使在这种情况下它可以忽略不计)




"标记" < mn ******* @ gmail.comha scritto nel messaggio

新闻:a4 ********************** ************ @ o40g2000 prn.googlegroups.com ...




" {

Is
"{$_SERVER[''DOCUMENT_ROOT'']}/inc/mysql-connect.php"
more efficient than
$_SERVER[''DOCUMENT_ROOT'']."/inc/mysql-connect.php"
?

Or does it still do a concatenation behind the scenes? I hear
concatenation is expensive... (even if its negligible in this scenario)

解决方案

_SERVER[''DOCUMENT_ROOT'']}/inc/mysql-connect.php"
more efficient than


_SERVER[''DOCUMENT_ROOT'']."/inc/mysql-connect.php"
?

Or does it still do a concatenation behind the scenes? I hear
concatenation is expensive... (even if its negligible in this scenario)



"Mark" <mn*******@gmail.comha scritto nel messaggio
news:a4**********************************@o40g2000 prn.googlegroups.com...

Is
"{


这篇关于concat vs string中的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆