<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>壞蛋的部落格 &#187; PHP</title>
	<atom:link href="http://www.pigo.idv.tw/archives/category/prog/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.pigo.idv.tw</link>
	<description>嘿嘿嘿嘿 .....</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:35:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>最近更新了另一套 CKEditor plugin for wordpress</title>
		<link>http://www.pigo.idv.tw/archives/1061</link>
		<comments>http://www.pigo.idv.tw/archives/1061#comments</comments>
		<pubDate>Mon, 15 Aug 2011 15:15:11 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ckeditor]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=1061</guid>
		<description><![CDATA[之前一直都是用 Dean&#39;s FCKEditor for wordpress 直到換了這套名字就叫 CKEditor for wordpress 感覺還不錯 http://wordpress.org/extend/plugins/ckeditor-for-wordpress/ 我為何要換這套呢 因為最近我的爛網站加掛了WordPress Mobile Edition 這個 Plugin , 主要是為了讓手機的介面比較簡單 , 這個手機版外掛裝起來挺簡單的 , 我大概花了不到一分鐘就裝好了 , 在我的 Samsung S2 i9100 下看還正常 , 就是佈景醜了點 , 但有比沒有好 而&#160;WordPress Mobile Edition 裝了之後 , 我發現原本回文用的文字編輯區無法在手機上使用 , 於是才換了&#160;CKEditor for wordpress &#160;, 這套似乎會判別裝置 , 若是手機 , 會自動把所見即得關掉 , 就只能回正常的文字 , 而若是控制台內編輯文章 , 也是純文字 [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/1061/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.4 Alpha 1 釋出 , 有個新特性挺棒的</title>
		<link>http://www.pigo.idv.tw/archives/1026</link>
		<comments>http://www.pigo.idv.tw/archives/1026#comments</comments>
		<pubDate>Wed, 29 Jun 2011 05:38:17 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[技術新聞區]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=1026</guid>
		<description><![CDATA[官網今天釋出了 PHP 5.4 Alpha 1 當中有介紹一些新特性 &#160; Added: Traits language construct Added: Array dereferencing support Added: DTrace support Traits 有點類似多重繼承可以把很多物件的某些功能合併 , 但其實又不是那樣 , 這個特性我不想多做介紹 , 因為我不喜歡 , 目前沒有 IDE 支援 , 要是寫起來都跑不出 auto complite 就很鳥了 哈哈 而 DTrace Support 我還不清楚是甚麼 , 但 Array deferencing support 我就挺喜歡了&#160; 舉個 sample code ?View Code PHP1 2 3 4 [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/1026/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>看到一種 lazy loading 作法 , 很棒</title>
		<link>http://www.pigo.idv.tw/archives/931</link>
		<comments>http://www.pigo.idv.tw/archives/931#comments</comments>
		<pubDate>Sun, 19 Dec 2010 09:43:12 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[lazy loading]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=931</guid>
		<description><![CDATA[網址 : http://www.patternsforphp.org/doku.php?id=lazy_initialization 這不同於以往看到的 lazy loading 每次都要呼叫 __set 或 __get 來判斷是否有初始化的作法 , 這種做法只會呼叫一次 __set 或 __get , 我按照上述的作法寫了一段 code 來測試效能 , 在我的 I5 CPU 處理器上測得的效能差異有 5 倍之多 以下是範例程式 &#160; ?View Code PHP&#60;?php error_reporting&#40;E_ALL&#41;; class View &#123; protected $_values = array&#40;&#41;; &#125; &#160; class Page &#123; public $_view; public function __construct&#40;&#41; &#123; unset&#40;$this-&#62;_view&#41;; &#125; public function [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/931/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP 判斷字串大小的優化方式</title>
		<link>http://www.pigo.idv.tw/archives/896</link>
		<comments>http://www.pigo.idv.tw/archives/896#comments</comments>
		<pubDate>Fri, 29 Oct 2010 07:05:38 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=896</guid>
		<description><![CDATA[其實我是在下面網址看到 http://www.chazzuka.com/blog/?p=58 於是自己寫了段測試 , 發現超驚人的 &#160; ?View Code PHP&#60;?php $foo = &#34;123&#34;; $time = microtime&#40;true&#41;; for&#40;$i=0; $i&#60;1000;$i++&#41; &#123; if&#40;isset&#40;$foo&#123;5&#125;&#41;&#41; &#123; echo &#34;5&#34;; &#125; &#125; printf&#40;&#34;%f \n&#34; , microtime&#40;true&#41;-$time&#41;; $time = microtime&#40;true&#41;; for&#40;$i=0; $i&#60;1000;$i++&#41; &#123; if&#40;strlen&#40;$foo&#41;&#62;5&#41; &#123; echo &#34;5&#34;; &#125; &#125; printf&#40;&#34;%f \n&#34; , microtime&#40;true&#41;-$time&#41;; ?&#62; &#160; 輸出結果 , 效能竟相差20倍以上 , isset() 你真好用 , 以前都不知道你的好耶 &#160; [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/896/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Apache + mod_fastcgi + php-fpm 設定</title>
		<link>http://www.pigo.idv.tw/archives/832</link>
		<comments>http://www.pigo.idv.tw/archives/832#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:48:03 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php-fpm]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=832</guid>
		<description><![CDATA[前言 這篇是有人叫我分享的 , 順便測一下 php-fpm 和 Apache 搭配起來的效能及穩定度 , 由於 php-fpm 是自帶的 FastCGI Process Manager , 所以和原本的 php fastcgi 有所不同 , php-fpm 若要搭配 Apache 只能以 mod_fastcgi 來運作 , 原本 Apache 有開發 mod_fcgid , 但 mod_fcgid 本身算是個 FastCGI Process Manager , 只能執行本地端 FastCGI , 而 php-fpm 可以用 Unix Socket 或 TCP 模式讓任何具備執行外部 FastCGI 程序的 WebServer 連接 [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/832/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP FPM ?</title>
		<link>http://www.pigo.idv.tw/archives/827</link>
		<comments>http://www.pigo.idv.tw/archives/827#comments</comments>
		<pubDate>Thu, 22 Jul 2010 15:34:03 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php-fpm]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/archives/827</guid>
		<description><![CDATA[很久沒有上官方網站看文件 , 今天晚上莫名其妙從官方網站看到一個叫 FPM 的東西 http://www.php.net/manual/en/install.fpm.php 按照上面的說法 , 不就是 FastCGI Process Manager 嗎 ? 怪了 , 原本 PHP 不就已經有支援 FastCGI 了 ? 仔細給他看一看 , 從 Google 上找一下 FPM 關鍵字後 &#8230;. 媽的 &#8230; 我的天 , 原來 FPM 這東西不得鳥 , 下面才是真正的 FPM 官方網站 http://php-fpm.org 原來 FPM 這東西可以解決 PHP FastCGI 甚至 mod_php 權限控管的不足 例如 , 可以 setuid , [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/827/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>我很納悶&#8230;怎麼一堆 PHP 程式設計師不知道要怎麼防 SQL Injection</title>
		<link>http://www.pigo.idv.tw/archives/820</link>
		<comments>http://www.pigo.idv.tw/archives/820#comments</comments>
		<pubDate>Tue, 22 Jun 2010 11:34:09 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=820</guid>
		<description><![CDATA[從 5 月份到 6 月份這段期間面試了好多個 PHP 程式設計師 , 包括也曾開職缺面試資訊主管 我都會問一個問題 , SQL Injection 怎麼防 ? 我說真的 , 大概面試了 10 來位 , 沒有一個人能夠脫口而出 , 不知道 SQL Injection 的程式設計師不會就算了 , 知道的人居然沒有一個人知道 PHP 原本就有功能可以過濾掉特殊字元 , 甚至還會回答用 str_replace 方法來過濾 , 所以我很想給看到這篇的人知道 如果你是用 mysql function , 那就是用 mysql_real_escape_string 去過濾 如果你是用 PDO , 就是用 bind value 作法 例如 ?View Code PHP1 [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/820/feed</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>實作多日 , 一個簡單的 Comet Chat Demo</title>
		<link>http://www.pigo.idv.tw/archives/781</link>
		<comments>http://www.pigo.idv.tw/archives/781#comments</comments>
		<pubDate>Sun, 04 Apr 2010 19:34:32 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[Mono C# VB]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=781</guid>
		<description><![CDATA[網址 : http://testcode.pigo.idv.tw/NetServ/CxClient/demo/simplechat/ 非常簡單的 chat , 沒有用到任何資料庫及檔案讀寫 , 完全透過 Comet Exchange Server 作資料交換 , 完全即時聊天 Script Language 採用 PHP , Comet Exchange Server 採用 C# 開發 改天我弄好一點會放出完整的 Source Code 原先我是要先做 Comet Http Server 的 , 但我現在先做了 Comet Exchange Server (簡稱 CxServer) CxServer 主要構想是可以讓 HTTP Server CGI 之間可以做資料交換 , CGI 部分任何語言都可以開發 , 如 php , asp.net [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/781/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>介紹 Netbeans 執行 PHPUnit (單元測試)</title>
		<link>http://www.pigo.idv.tw/archives/617</link>
		<comments>http://www.pigo.idv.tw/archives/617#comments</comments>
		<pubDate>Sat, 20 Feb 2010 15:12:01 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[PHPUnit]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=617</guid>
		<description><![CDATA[前言 Netbeans 6.8 出來之後 , 我覺得已經非常好用了 , 尤其在程式碼的自動完成的方面已經改成和 Zend Studio 一樣 , 不需要按甚麼 ALT+J 了 , 而且 Netbeans 的反應速度就是比 Zend Studio 來的快 , 現在我也都改用 Netbeans 了 , 而本篇是稍微介紹一下如何用 Netbeans 來執行 PHP 的單元測試 PHPUnit 介紹 PHPUnit 其實是個 PHP 寫成的 Framework , 主要功能就是自動對我們所寫的PHP程式做輸入輸出的檢查 程式寫久的人應該都知道動一髮牽全身的道理 , 我自己也常常更動了某個物件的程式碼之後 , 結果很多相關連的物件或網頁就跟著就出錯了 , 但我們不可能每次更動程式之後 , 就去用瀏覽器慢慢的測試可能發生的狀況 , 人的記憶有限 , 誰會知道這個物件有那些網頁會用到 , [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/617/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP libevent vs stream_select 性能測試</title>
		<link>http://www.pigo.idv.tw/archives/589</link>
		<comments>http://www.pigo.idv.tw/archives/589#comments</comments>
		<pubDate>Tue, 12 Jan 2010 15:43:25 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[libevent]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=589</guid>
		<description><![CDATA[PHP 下要做 Socket 多工目前只有 select 或用超慢的 fork 方式 , 但學過 Socket Programing 的人都知道 select 在大量連線下的效能會很差 , 而在很早之前我曾在 PECL&#160; 看見有個 event 的 extension 是利用 Kernel 來處理 I/O 事件 , 舉凡 File , Socket 都可, 當時那套 event extension 是利用 Linux epoll 或 FreeBSD kqueue 的 Kernel API 直接幹的 , 現在則有另一套 libevent 的 extension 出現在 PECL 上 , [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/589/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

