filter拡張モジュールのFILTER_CALLBACK
filter_var($param, FILTER_CALLBACK, array($obj, 'callback'))
で問題ないはずが、実際にやってみると
filter_var() : First argument is expected to be a valid callback in ...
となってしまいました。そこで、ちょっと小細工して、
filter_var($param, FILTER_CALLBACK, array('options' => array($obj, 'callback')));
とするとコールバックされました。うーん。こんなものか?
また、Do You PHP?の方も更新してますので併せてどうぞ。
eAccelerator0.9.5のWebUI
久々に使ってみようと思い、0.9.5をインストールしてみると、
<?php eaccelerator(); ?>
とすると怒られた。「あれ?」と思い、関数一覧を表示してみると、eaccelerator関数が見あたらない。ソースを追っかけてみると、eaccelerator.cにあるはずの
PHP_FE(eaccelerator, NULL)
がない!げ〜っ!
ということで、過去のReleaseNoteを見てみる(先に見ろ)と、
ということで、0.9.5β2から関数が削除され、代わりにcontrol.phpが用意されるようになった模様。
The old web control panel and the disassembler have been removed from the code. They have been replaced with a set of php functions that allow the same functionality to be implemented in a PHP script. The control.php and the dasm.php files are such scripts. More information about this can be found in the README.
新しいWebUIの見た目は旧WebUIとある程度似てますが、ちらほらwarningが出ますね。。。と思い、調べてみると、php.iniにeaccelerator.allowed_admin_pathを設定する必要があるようです。設定後はwarningは出ません。
あ。ちなみに、BASIC認証がかかりますが、ユーザーID・パスワードはcontrol.phpに書かれてますので、実運用での利用に際しては適宜変更する必要があるでしょう。
追記
control.phpって、short_open_tag=Onでないとダメっぽいですね。。。