月: 2008年6月
print_r の出力文字列を配列に戻すunprint_r関数を作ってみた
問. 配列を+(プラス)演算子で加算すると?
さて問題です。次のようなPHPスクリプトがあります。
<?php
$fruit1 = array(‘apple’, ‘banana’, ‘cherry’);
$fruit2 = array(‘kiwi’, ‘lemon’, ‘melon’);
$fruit = $fruit1 + $fruit2;
?>
$fruitの値は次のA~Cのどれになるでしょうか?
A. array(‘apple’, ‘banana’, ‘cherry’)
B. array(‘apple’, ‘banana’, ‘cherry’, ‘kiwi’, ‘lemon’, ‘melon’)
C. array(‘kiwi’, ‘lemon’, ‘melon’)
