揮発性のメモ2

http://d.hatena.ne.jp/iww/

runkitを入れる

まず、autoconf関係とpeclをインストール

# apt-get install autoconf php5-dev

次にrunkitをインストールすると

# pecl install runkit-beta
/tmp/pear/temp/runkit/runkit_import.c: In function ‘php_runkit_import_class_props’:
/tmp/pear/temp/runkit/runkit_import.c:230: warning: passing argument 2 of ‘zend_unmangle_property_name’ makes integer from pointer without a cast
/tmp/pear/temp/runkit/runkit_import.c:230: error: too few arguments to function ‘zend_unmangle_property_name’
make: *** [runkit_import.lo] エラー 1
ERROR: `make' failed

PHPプロ!TIPS+
ここにあるようなエラーになるので、手順のとおりやりなおす。


インストール後、さっそくテストしてみる

#!/usr/bin/php -q
<?
function testme(){ echo "Original Testme Implementation\n"; }

testme();
runkit_function_redefine('testme','','echo "New Testme Implementation\n";');
testme();
?>
$ ./test.php 
Original Testme Implementation
セグメンテーション違反です

失敗っぽい