runkit とは PHPの関数やクラスのメソッドの挙動を変更することを目的としたPHP拡張です。(pecl で配布されています) pecl runkit プロダクションコードで使うことはないでしょうが、テストを行う際に、元のコードの挙動を少しだけ変更することによってテストする範囲を限定するといった使い方があります。 テストではPHPUnitの 「テストダブル」 をうまく使えば、runkit を乱用する必要はないのですが、以下の様な場合には runkit の出番となります。 PHPの組み込み関数の挙動を変えたい staticメソッドの挙動を変えたい staticメソッドをモックするライブラリである StatickMock は内部的に runkit を利用しています runkit を使ったコードは以下のような感じになります。 Example クラスにもともとあった foo というメソッドの挙
Enhance your PHP frameworks/libraries by making them Faster Better More Reliable Type System Zephir combines static and dynamic typing in a friendly language that is compiled down to machine code using the industry standard compilers. Memory safety Despite being a compiled language, it does not allow you to use pointers, it provides a garbage collector to avoid memory leaks and more. Compilation m
PHP 5.6 で標準モジュールとして導入された phpdbg の作者である Joe Watkins さんが strict 拡張モジュールを公開しました。くわしい経緯に関しては Joe さんのブログ記事をご参照ください。このモジュールを導入すると、次のスカラー型のタイプヒントが利用できるようになります。 string integer, int float, double boolean, bool resource まだ正式バージョンはリリースされていないので、モジュールの利用は学習や評価を目的としたローカル環境にとどめておいたほうがよいでしょう。 インストール strict モジュールをインストールするには次のコマンドを実行します。 Windows 版は準備中とのことです。パッケージ情報のページによると 0.2.0 では PHP 5.4.0 とそれ以降のバージョンを対象としてます。 ph
Since PHP 5.2.0, JSON format support is provided by ext/json. During a code license review, Debian project have discovered a issue with the code used, reported as Bug #63520. Effectively, code from json.org is not free, as its License includes a restriction to freedom 0 (run the program for any purpose) : “The Software shall be used for Good, not Evil”. The discussion about this state is out of th
オープンソースのPHPアクセラレーター「XCache」の開発チームは10月29日、最新版となる「XCache 3.0.0」を公開した。プロジェクトのWebサイトよりダウンロードできる。 XCacheはPHPの中間コード(バイトコード)をキャッシュして再利用することでPHPの性能を向上させるシステム。PHPの拡張モジュールとして実装され、容易に設定、利用できる。開発者らによると、最大で5倍程度の高速化が可能という。PHP 4.3/4.4およびPHP 5系で安定して動作し、PHP 6のアルファ版も実験的という段階ながら対応する。プロジェクトはWebサーバー「Lighttpd」を開発したmOoが率いている。 XCache 3.0は4月に公開されたバージョン2.0以来のメジャーリリースとなる。コードのリファクタリングを行い、機能をサブモジュール単位にしてクリーンにしたという。APIのアップデートも
Runkit extension for PHP For all those things you.... probably shouldn't have been doing anyway.... but surely do! Feel free to support Dmitry Zenovich via PayPal (dzenovich@gmail.com) if Runkit serves you. By making donation you invest in the project's future, helping it to be compatible with current PHP versions and to have less bugs and more features. Runkit has three groups of features outline
php-memcached-dev/php-memcachedをforkしたmsgpack-and-snappyブランチで、シリアライズ方式にMessagePackを、圧縮方式にSnappyを選べるようにした。→GitHub MessagePackを使うにはPECL msgpackをインストールした上で、configureのオプションに --enable-memcached-msgpack を、Snappyを使うにはSnappyをインストールした上で --with-snappy-dir を付ければよい。 MacPortsでライブラリを入れている場合の例: phpize ./configure \ --enable-memcached \ --enable-memcached-msgpack \ --with-libmemcached-dir=/opt/local \ --with-snap
Introduction AOP is a PECL extension that enables you to use Aspect Oriented Programming in PHP, without the need to compile or proceed to any other intermediate step before publishing your code. The AOP extension is designed to be the easiest way you can think of for integrating AOP to PHP. AOP aims to allow separation of cross-cutting concerns (cache, log, security, transactions, ...) PHP's AOP
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く