PEAR :: Package :: PEAR :: 1.4.0

Changelog:

This is a major milestone release for PEAR. In addition to several killer features, every single element of PEAR has a regression test, and so stability is much higher than any previous PEAR release.

New features in a nutshell:
  • full support for channels
  • pre-download dependency validation
  • new package.xml 2.0 format allows tremendous flexibility while maintaining BC
  • support for optional dependency groups and limited support for sub-packaging
  • robust dependency support
  • full dependency validation on uninstall
  • remote install for hosts with only ftp access – no more problems with restricted host installation [through PEAR_RemoteInstaller package]
  • full support for mirroring
  • support for bundling several packages into a single tarball
  • support for static dependencies on a uri-based package
  • support for custom file roles and installation tasks

NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations to the latest version, or PEAR will not upgrade properly

待望のPEAR 1.4がついにリリース。 最大の変更点はChannelをサポートしたことでしょう。ChannleとはPEAR本家以外にもリポジトリを勝手に立てて、そこからpearを使ってインストールしたりできる機能です。 全体的にPEAR 1.4を機にpearコマンドによるパッケージ管理に本腰を入れてるっぽいです。
おれもPEARは手動アップロード派(ソフト毎にPEARを持つ派)ですが、ちょっと試してみようかな。PEAR 1.4リリース後、即座にSeasar-php MLではS2Container.PHP5、S2Dao.PHP5、MapleをChannelサーバで配信しようという案が。 動きはやっ。

AnyEdit tools plugin for Eclipse

3 ””Convert → Leading tabs to spaces”“
(trailing whitespace will be removed automatically)

4 ””Convert → Leading spaces to tabs”“
(trailing whitespace will be removed automatically)

エディターに細かい機能を追加するEclipseのAnyEdit tools pluginがPHPEclipseでも使えるようになったとか。

spaceをtabにする機能はちょっと欲しい。

PECL :: Package :: PDO_MYSQL

This extension provides a Mysql 3.x/4.x driver for PDO.

PDO_*系が一斉に1.0RC1をリリース。
こりゃ正式リリースが近いわ。

仕事ではPHP5.1が出たら(すぐ出そう)真剣に何使うか考えなきゃいけないですが、現状ではMojavi2使ってる人も多いはず!(おれも)

そこで地味Tips

「modules/foo/config.php」を置いておくとそのmodule呼ばれた時に読み込んでくれる!(ExecutionFilterが)

使い方としてはそのモジュールだけで使うライブラリや定数を書いとくと便利っぽいです。

<?php
define("FOO_BAR_LIMIT", 10);
include_once("Pager/Pager.php");

include_onceとPHP閉じタグを書かないのが流行です。(うz)

日本PHPユーザ会からの平面波

いつのまにKOF2005を日本PHPユーザ会としてやるようになったのだ?

ユーザ会の人が3人1組になって戦うのかと思った・・・orz

PEAR :: PEPr :: Details :: XML_Feed_Parser

XML_Feed_Parser is a package providing unified access to a range of XML-based syndication formats. At present it offers near-complete support for Atom 1.0, RSS1.0 and RSS2.0, and it should be straightforward to add support for other formats.

DraftにRSSやAtomを統一的に扱おうというParserがあがってます。
XML_RSSではAtom無理なのでProposal通って欲しいです。

メールで簡単なインタビューを受けただけですが、今月の日経システム構築にPHPフレームワークの話でちょろっと名前が。
ツイてる!

いやなブログ: 配列操作の比較表: Ruby, Python, JavaScript, Perl, C

Ruby, Python, JavaScript, Perl, C の配列操作の比較表を作りました。

言語ごとの配列操作の一覧。

array_push($a, $x)

って何かヘボさが漂って嫌ですな。組み込みクラスが多いのって大事かも。
PHP4で組み込みクラスといえば、、、

stdClass!、dir!、そして・・・__PHP_Incomplete_Class

・・・なんて貧弱なラインナップなんだ。

最近よく見るJSONの意味がわからなかったので調べてみました。

Introducing JSON

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition – December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C , C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

JSONとは軽量のデータ交換用のフォーマットだそうです。 というかJavaScriptのオブジェクトの形式でデータをやり取りしたら楽だよねってことみたいです。
↓たとえばこんな感じだそうです。(via XMLをJSONデータに変換するJavascriptライブラリ – スピリッツオブゼロ@blog)

  ListingInfo: {
    Request: {
      Parameters: {
        Parameter: [
          { value: "あいうえお",
            name: "keyword" },
          { value: "Shift_JIS",
            name: "enc" },
          { value: "xml_lite4",
            name: "tf" },
          { value: "FP",
            name: "at" },
          { value: "10",
            name: "ipp" },
          { value: "777",
            name: "categ_id" }
        ]
      }
    }
  }
}

PHPの配列をJavaScriptの配列に変換する処理なんかはやってる人も結構いるかもしれませんが、ちゃんと名前付けて仕様化してるところがすごくいい。

よく見たらPEARにもServices_JSONがProposalに上がってます。

JSON/READ-ME-JSON.php:

// create a new instance of JSON
require_once('JSON.php');
$json = new JSON();

// convert a complexe value to JSON notation, and send it to the browser
$value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
$output = $json->encode($value);

print($output);
// prints: ["foo","bar",[1,2,"baz"],[3,[4]]]

// accept incoming POST data, assumed to be in JSON notation
$input = $GLOBALS['HTTP_RAW_POST_DATA'];
$value = $json->decode($input);

こんな感じで使えるなら便利そう。

既にXMLでやり取りしてるサービスもコレ(Amazon Web サービス ブログ: XML→JSON展開クラス)とか使ったらもっと便利になるかも!

ゼンドジャパンとユヒーロが障害対策のソリューションで提携 – HotPHPPER News

ITmediaにてゼンドジャパンとユヒーロという会社が提携がし、PHP+MySQL/PostgreSQL環境の障害対策のソリューションの実現について掲載されています。

ユヒーロってまさか、あの・・・?