考虑下面的代码片段。?phpdefine(“STOP_AT”,1024);$result = array();/在此处填入代码/{$result
考虑下面的代码片段。
?php
define(“STOP_AT”,1024);
$result = array();
/在此处填入代码/
{
$result[] = $idx;
}
print_r($result );
?
标记处填入什么代码才能产生如下数组输出?()
Array([0] = 1 [1] = 2 [2] = 4 [3] = 8[4] = 16[5] = 32 [6] = 64 [7] = 128 [8] = 256 [9] = 512)
A.for($idx *= 1
B.$idx STOP_AT
C.$idx *= 2)
D.foreach($result as $key = $val)
E.while($idx *= 2)
F.for($idx *= 2
G.STOP_AT = $idx
H.$idx =0)