バージョンPHP4.3.11です。

「test.php」というファイルに別のディレクトリにあるtest2.phpもしくはtest3.phpというファイルの
どちらを上書きするか、セレクトメニューで選択した方を上書きコピーしたいのですが

■select.php (選択した方を読み込むファイル)
require("filecopy.php");
if ($sentaku == true) { //選択ボタンが押された時コピー実行
copyfile();
}

■filecopy.php(select.phpで呼び出された動作)
function copyfile{
switch ($datafile) {
case "test2": //test2が選択された時はtest.phpにtest2.phpを上書き
chmod ("test.php",0666);
copy ("file/test2.php","test.php");
chmod ("test.php",0666);

case "test3": //test3が選択された時はtest.phpにtest3.phpを上書き
chmod ("test.php",0666);
copy ("file/test3.php","test.php");
chmod ("test.php",0644);
}

という感じで書きましたが、
Fatal error: Call to undefined functionエラーが発生します。
どうすれば良いでしょうか?