以下代码生成未定义变量 $s 而不是“第二个”
define("T1","one");
define("T2","two");
$test="number %2$s";
$test=sprintf($test, T1,T2);
echo $test;
以下代码生成未定义变量 $s 而不是“第二个”
define("T1","one");
define("T2","two");
$test="number %2$s";
$test=sprintf($test, T1,T2);
echo $test;