字符串模板化
$name = 'tanrx';
$msgContent = "hello, ${name}";
eval( "\$msgContent = \"$msgContent\";" );
输出 hello, tanrx
提取$和花括弧的字符正则表达式
"/(?:\\$\{)([^{}$]*)(?:\})/"
$name = 'tanrx';
$msgContent = "hello, ${name}";
eval( "\$msgContent = \"$msgContent\";" );
输出 hello, tanrx
"/(?:\\$\{)([^{}$]*)(?:\})/"