<?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>Computer, Electron and Technology &#187; php</title>
	<atom:link href="http://www.donevii.com/tags/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.donevii.com</link>
	<description>关注技术、移动互联网以及一切 GEEK &#38; NERD 的事情</description>
	<lastBuildDate>Wed, 21 Dec 2011 10:49:54 +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>Mac 下安装 PHP 扩展 vld &amp; xhprof</title>
		<link>http://www.donevii.com/post/974.html</link>
		<comments>http://www.donevii.com/post/974.html#comments</comments>
		<pubDate>Thu, 06 Jan 2011 03:26:57 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[vld]]></category>
		<category><![CDATA[xhprof]]></category>

		<guid isPermaLink="false">http://www.donevii.com/?p=974</guid>
		<description><![CDATA[最近因为经常离线调试，所以开始重新在本机搭环境，还好 Mac 原本就自带了 PHP 。 [515][MacBookPro: /tmp]$ which php /usr/bin/php [516][MacBookPro: /tmp]$ php --version PHP 5.3.3 (cli) (built: Aug 22 2010 19:41:55) Copyright (... ]]></description>
			<content:encoded><![CDATA[<p>最近因为经常离线调试，所以开始重新在本机搭环境，还好 <a href="http://www.donevii.com/post/tag/mac" class="st_tag internal_tag" rel="tag" title="Posts tagged with mac">Mac</a> 原本就自带了 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">PHP</a> 。</p>
<pre name="code" class="shell">
[515][MacBookPro: /tmp]$ which php
/usr/bin/php
[516][MacBookPro: /tmp]$ php --version
PHP 5.3.3 (cli) (built: Aug 22 2010 19:41:55)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
</pre>
<p>既然有 php 那就先试试直接用 pecl 来安装。</p>
<pre name="code" class="shell">
sudo pecl install -f <a href="http://www.donevii.com/post/tag/vld" class="st_tag internal_tag" rel="tag" title="Posts tagged with vld">vld</a>
sudo pecl install -f <a href="http://www.donevii.com/post/tag/xhprof" class="st_tag internal_tag" rel="tag" title="Posts tagged with xhprof">xhprof</a>
</pre>
<p>不过安装 xhprof 时提示说要在扩展的目录里，查了一下 <a href="http://pecl.php.net/bugs/bug.php?id=16438&#038;edit=1">PECL Bug #16438</a> 里面说是 pecl 里 xhprof 包的问题。那么问题也就很好解决了，直接把源码包下载下来安装即可。</p>
<pre name="code" class="shell">
wget http://pecl.php.net/get/xhprof-0.9.2.tgz
tar zxf xhprof-0.9.2.tgz
cd xhprof-0.9.2/extension
phpize
./configure
make
make install
</pre>
<p>然后修改 /etc/php.ini 如果没有这个文件就 sudo cp /etc/php.ini.default /etc/php.ini。<br />
在 php.ini 中增加 extension=vld.so 和 extension=xhprof.so 和针对这两个扩展的详细配置，这个可以在网上搜到。</p>
<p>然后在 ~/.bash_profile 里增加 alias phpo=&#8217;php -dvld.active=1&#8242;<br />
以后再打 phpo xxxx.php 就可以看到 vld 的效果了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/974.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>利用 XCode 开发 PHP 的方法</title>
		<link>http://www.donevii.com/post/953.html</link>
		<comments>http://www.donevii.com/post/953.html#comments</comments>
		<pubDate>Wed, 02 Jun 2010 10:45:52 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.donevii.com/post/953.html</guid>
		<description><![CDATA[在 Mac 平台上也试了不少的 IDE 和 Editor ，各有特色吧。 之前听说过有人在 XCode 上做 PHP 开发，所以今天我也试了一下，和 Textmate 一样，采用 Esc 键做为自动补全的快捷键，但是有下拉列表，并... ]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://www.donevii.com/post/tag/mac" class="st_tag internal_tag" rel="tag" title="Posts tagged with mac">Mac</a> 平台上也试了不少的 IDE 和 Editor ，各有特色吧。</p>
<p>之前听说过有人在 XCode 上做 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">PHP</a> 开发，所以今天我也试了一下，和 Textmate 一样，采用 Esc 键做为自动补全的快捷键，但是有下拉列表，并且在输入时会有提示。</p>
<p>在 Create Project 时选择最左侧的 Other 里面的 Empty Project</p>
<p>
<img src="http://www.donevii.com/wp-content/uploads/2010/06/New-Project.jpg" width="480" height="354" alt="New Project.jpg" /></p>
<p>然后选位置保存即可，如果有代码想添加进来直接在菜单的 Project 里有 Add to Project</p>
<p>
<img src="http://www.donevii.com/wp-content/uploads/2010/06/Project.jpg" width="327" height="480" alt="Project.jpg" /></p>
<p>
<img src="http://www.donevii.com/wp-content/uploads/2010/06/test3.php-xcode_php_test.jpg" width="480" height="245" alt="test3.php - xcode_php_test.jpg" /></p>
<p>代码这样就导入进来了。</p>
<p>但是当我们编辑时会发现一些 PHP 语法的关键字颜色不对，那么可以去修改下面的文件。</p>
<pre style="border: 2px dashed #eee; padding: 10px;">
cd /<a href="http://www.donevii.com/post/tag/developer" class="st_tag internal_tag" rel="tag" title="Posts tagged with developer">Developer</a>/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
vim PHP.xclangspec
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/953.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>require_once 和 require 的性能比较</title>
		<link>http://www.donevii.com/post/896.html</link>
		<comments>http://www.donevii.com/post/896.html#comments</comments>
		<pubDate>Wed, 08 Jul 2009 09:15:45 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.donevii.com/post/896.html</guid>
		<description><![CDATA[之前大家都是在程序里写上简单的 require_once 和 require 然后直接跑一遍 ab 来看时间，这回 Konstantin Rozinon 在 apache debug 模式下看了一下 lstat64 的操作数量，对比结果说 require_once 和 require 在时间... ]]></description>
			<content:encoded><![CDATA[<p>之前大家都是在程序里写上简单的 require_once 和 require 然后直接跑一遍 ab 来看时间，这回 Konstantin Rozinon 在 apache <a href="http://www.donevii.com/post/tag/debug" class="st_tag internal_tag" rel="tag" title="Posts tagged with debug">debug</a> 模式下看了一下 lstat64 的操作数量，对比结果说 require_once 和 require 在时间上相关非常非常小，但是在读文件时是用绝对路径还是相对路径对性能还是有一些影响，因为绝对路径会少一些 stat。</p>
<p>引用原文：<br /><small><code><span class="html">- When using absolute_path there are fewer stat() system calls.<br />- When using relative_path there are more stat() system calls because it has to start stat()ing from the current directory back up to / and then to the include/ directory.</span></code></small></p>
<p>个人习惯上还是推荐用 require_once，并且这个不是显示的写在各个文件中，而是在中心的 loader 里统一负责根据 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a>5 的 __call 这个特性来去 require_once 相应的文件，一些性能上的损耗可以通过其它方式来弥补。比如 APC、XCache、Eacc 这些，opcode <a href="http://www.donevii.com/post/tag/cache" class="st_tag internal_tag" rel="tag" title="Posts tagged with cache">cache</a> 现在成了 PHP 的必需品了。</p>
<p>原文：<a href="http://cn.php.net/require_once">点击进入</a></p>
<p>btw: zend studio 7 beta 真慢……</p>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/896.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PEAR 2009年1月12日更新</title>
		<link>http://www.donevii.com/post/741.html</link>
		<comments>http://www.donevii.com/post/741.html#comments</comments>
		<pubDate>Mon, 12 Jan 2009 13:56:29 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.donevii.com/post/741.html</guid>
		<description><![CDATA[Services_YouTube 0.2.2 Crypt_RSA 1.2.1 HTTP_Request2 0.2.0 PHP_UML 0.5.1 Net_LDAP2 2.0.0RC5 PEAR_Info 1.9.... ]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://pear.php.net/package/Services_YouTube/download/0.2.2/">Services_YouTube 0.2.2</a>
</li>
<li><a href="http://pear.php.net/package/Crypt_RSA/download/1.2.1/">Crypt_RSA 1.2.1</a>
</li>
<li><a href="http://pear.php.net/package/HTTP_Request2/download/0.2.0/">HTTP_Request2 0.2.0</a>
</li>
<li><a href="http://pear.php.net/package/PHP_UML/download/0.5.1/">PHP_UML 0.5.1</a>
</li>
<li><a href="http://pear.php.net/package/Net_LDAP2/download/2.0.0RC5/">Net_LDAP2 2.0.0RC5</a>
</li>
<li><a href="http://pear.php.net/package/PEAR_Info/download/1.9.1/">PEAR_Info 1.9.1</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/741.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP招聘信息－PHP/MySQL DEVELOPER－TORONTO</title>
		<link>http://www.donevii.com/post/364.html</link>
		<comments>http://www.donevii.com/post/364.html#comments</comments>
		<pubDate>Thu, 13 Dec 2007 07:09:39 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[hire]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[toronto]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[招聘]]></category>

		<guid isPermaLink="false">http://www.donevii.com/post/364.html</guid>
		<description><![CDATA[Divaris Alexander Corporation is looking for an experienced PHP developer to contribute as a contractor in the current development of our web based property tax platform. Duties/ Responsibilities: Database Modeling. Preparation of application architectur... ]]></description>
			<content:encoded><![CDATA[<p>Divaris Alexander Corporation is looking for an experienced <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">PHP</a> <a href="http://www.donevii.com/post/tag/developer" class="st_tag internal_tag" rel="tag" title="Posts tagged with developer">developer</a> to contribute as a contractor in the current development of our <a href="http://www.donevii.com/post/tag/web" class="st_tag internal_tag" rel="tag" title="Posts tagged with web">web</a> based property tax platform.<br />
Duties/ Responsibilities:<br />
Database Modeling.<br />
Preparation of application architecture.<br />
Design and implement application.<br />
We are looking for a well-organized, conscientious person with skills in PHP programming and a working knowledge of <a href="http://www.donevii.com/post/tag/mysql" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">MySQL</a>. You will be required to interact with our team and deploy the application features quickly, maintaining quality and reliability.<br />
Experience required:<br />
Organizations Skills<br />
Communication Skills (oral and written in English)<br />
Understanding of <a href="http://www.donevii.com/post/tag/html" class="st_tag internal_tag" rel="tag" title="Posts tagged with html">HTML</a> standards<br />
Working knowledge of XML, CSS and <a href="http://www.donevii.com/post/tag/javascript" class="st_tag internal_tag" rel="tag" title="Posts tagged with javascript">JavaScript</a><br />
PHP 4 and 5 (4 years +)<br />
MySQL 4.11 and 5.1 (4 years +)<br />
Additional Skills:<br />
Working knowledge in a <a href="http://www.donevii.com/post/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a> Environment<br />
Knowledgeable in database modeling and tools(programs)<br />
Flex 2 or 3 and <a href="http://www.donevii.com/post/tag/actionscript" class="st_tag internal_tag" rel="tag" title="Posts tagged with actionscript">Actionscript</a><br />
Coldfusion<br />
Based in <a href="http://www.donevii.com/post/tag/toronto" class="st_tag internal_tag" rel="tag" title="Posts tagged with toronto">Toronto</a>, <a href="http://www.dival.com">Divaris Alexander Corporation</a>, incorporated in 1987, provides property assessment and municipal tax consulting services for industrial, commercial, investment and special use property owners and occupants.<br />
We require that you be based in Toronto and able to work onsite.<br />
Apply via email to <a href="mailto:info@dival.com">info[at]dival.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/364.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP:set_error_handler &#8230;&#8230;need more</title>
		<link>http://www.donevii.com/post/350.html</link>
		<comments>http://www.donevii.com/post/350.html#comments</comments>
		<pubDate>Sat, 29 Sep 2007 10:17:41 +0000</pubDate>
		<dc:creator>dengwei</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.donevii.com/?p=350</guid>
		<description><![CDATA[本来想自己写个 error 处理的 logger 结果发现通过 set_error_handler 没办法捕获到 fatal error &#38; parse error 唉，真愁人呐。 在 php.net 上也没有找到办法，后来反到是在 zend.com 上找到了解决 catch fatal err... ]]></description>
			<content:encoded><![CDATA[<p>本来想自己写个 <a href="http://www.donevii.com/post/tag/error" class="st_tag internal_tag" rel="tag" title="Posts tagged with error">error</a> 处理的 logger 结果发现通过 set_<a href="http://www.donevii.com/post/tag/error" class="st_tag internal_tag" rel="tag" title="Posts tagged with error">error</a>_handler 没办法捕获到 fatal <a href="http://www.donevii.com/post/tag/error" class="st_tag internal_tag" rel="tag" title="Posts tagged with error">error</a> &amp; parse <a href="http://www.donevii.com/post/tag/error" class="st_tag internal_tag" rel="tag" title="Posts tagged with error">error</a> 唉，真愁人呐。</p>
<p>在 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a>.net 上也没有找到办法，后来反到是在 zend.com 上找到了解决 catch fatal error 的办法就是在 auto_prepend_file 和 auto_append_file 上做手脚。</p>
<p>prepend 的文件里面有一个 string 里面是个 error page 的 <a href="http://www.donevii.com/post/tag/html" class="st_tag internal_tag" rel="tag" title="Posts tagged with html">html</a> 包括一个 script 可以把错误信息发送到 <a href="http://www.donevii.com/post/tag/server" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> 的一个 api 上。</p>
<p>而在 append 的文件里通过 ob_get_contents() 来把那个 string 给去掉，如果能去掉就说明程序中间的执行流程正确，无错，如果有 fatal error 则没有办法到达 append 文件这步，所以会显示那个 html 页面。</p>
<p>方法还可以，但是因为每个 php 都要 prepend &amp; append 可能效率会不行，和 Xuanyan 讨论了一小会暂时还是没有什么好办法来捕获 fatal &amp; parse error 。</p>
<p>:(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/350.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XCache &amp; XDebug on road</title>
		<link>http://www.donevii.com/post/349.html</link>
		<comments>http://www.donevii.com/post/349.html#comments</comments>
		<pubDate>Fri, 28 Sep 2007 08:03:37 +0000</pubDate>
		<dc:creator>gavinkwoe</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.donevii.com/?p=349</guid>
		<description><![CDATA[终于配置上 XCache 和 XDebug 了，可惜的是 php-java-bridge 一直没搞好，只有双击运行 JavaBridge 后才行，唉，要是能内置到 PHP 里就好了。 继续研究 FastCGI &#38; Lighttpd 如果说之前在 UUSee 是向上研究，... ]]></description>
			<content:encoded><![CDATA[<p>终于配置上 XCache 和 XDebug 了，可惜的是 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a>-<a href="http://www.donevii.com/post/tag/java" class="st_tag internal_tag" rel="tag" title="Posts tagged with java">java</a>-bridge 一直没搞好，只有双击运行 JavaBridge 后才行，唉，要是能内置到 <a href="http://www.donevii.com/post/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">PHP</a> 里就好了。</p>
<p>继续研究 <a href="http://www.donevii.com/post/tag/fastcgi" class="st_tag internal_tag" rel="tag" title="Posts tagged with fastcgi">FastCGI</a> &amp; <a href="http://www.donevii.com/post/tag/lighttpd" class="st_tag internal_tag" rel="tag" title="Posts tagged with lighttpd">Lighttpd</a></p>
<p>如果说之前在 UUSee 是向上研究，既“抽象”、“架构”的话，那么来 IMobile 之后研究方向则是向下，研究底层，研究以前没注意到的更细节的地方了。</p>
<p>:)</p>
<p>Good days, good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.donevii.com/post/349.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

