【PHP】下らねぇ質問はここに書き込みやがれ 47
■ このスレッドは過去ログ倉庫に格納されています
0403nobodyさん
2007/06/15(金) 14:00:57ID:???function test($way, $inc , $math){
$result = $way + $inc + $math;
return $result;
}
}
class word{
function word($string, $string2){
$result = $string.$string2;
return $result;
}
}
$calc = new math;
$result = $calc->test(1,2,3);
echo "math : ".$result; // 6
$word = new word;
$words = $word->word('men','bou');
echo "words : ".$words; // ERROR: MISSING ARGUMENTS
上のMathではエラーはでないのですが
下のWordクラスでは Missing Arguments 1 for word::word()とか出てくるんですが、どうしてですか?
PHP5.10です。
■ このスレッドは過去ログ倉庫に格納されています