Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 527 Bytes

0338.md

File metadata and controls

27 lines (23 loc) · 527 Bytes

What is the output of the following PHP script?

$colors = ['r' => 'f00', 'g' => '0f0', 'b' => '00f'];
next($colors);
foreach ($colors as $k => $v) {
    echo $k;
}
reset($colors);
while (list($v$k) = each($colors)) {
    echo $v;
}
  • A) rgbrgb
  • B) rgbgb
  • C) rgbf000f000f
  • D) gbrgb
Answer

Answer: A