PHP の世代交代が進んでますね! いい加減 PHP 5.2 に対応しなくてもいい流れになって欲しいものですが、レンタルサーバーによっては未だ 5.2 のところもあるとかないとか。 5.2 はすっぱり諦めて、無名関数を使いましょう。 無名関数とは 参考&引用: PHP: 無名関数 – Manual 無名関数はクロージャとも呼ばれ、 関数名を指定せずに関数を作成できるようにするものです。 コールバック パラメータとして使う際に便利ですが、用途はそれにとどまりません。 他の言語なら当たり前のように使えていたのがようやく。 関数の名前をいちいち付けずに実行できる、ってやつです。 PHP 5.3 以上で対応。 無名関数、どういうときに使うか PHP マニュアルの説明通り、コールバックで使うことが多いです。 その他にも変数に代入できたり。 // $wp に無名関数を代入 $wp = function