<?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>Zen Space &#187; PHP</title>
	<atom:link href="http://reeze.cn/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://reeze.cn</link>
	<description>php erlang javascript ruby python web linux mac os x</description>
	<lastBuildDate>Fri, 02 Jul 2010 07:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>在PHP中检查PHP文件是否有语法错误</title>
		<link>http://reeze.cn/2009/10/09/check-php-files-syntax-in-php/</link>
		<comments>http://reeze.cn/2009/10/09/check-php-files-syntax-in-php/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 11:21:32 +0000</pubDate>
		<dc:creator>reeze</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[syntax check]]></category>

		<guid isPermaLink="false">http://reeze.cn/?p=49</guid>
		<description><![CDATA[之前在当当的时候的一个项目中用到了一个简单的模板引擎，其实也是借鉴discuz来做的模板引擎，很简单，它所作的事情就是把一些自定义的标签编译成php代码。已经说了很简单了，所以编译的时候也名优进行模板语法的检查，那么在开发过程中就会出现编译出来的php文件有语法问题，有语法问题没有关系，我修改重新编译一下就好了。首先不能在每次请求的时候都把php模板重新编译一下，会严重影响性能，折中的处理时在每个编译好的php文件末尾检查一下该模板文件是否已经修改过，根据设定的更新频率，如果又需要则重新编译模板文件，现在的问题是编译出来的php文件自己有语法错误，根本执行不到模板检查那一步，所以即使修改了模板文件中的问题也不会重新编译。 所以我想寻找一种简单的方法来检查生成的php文件是否合法。不合法就重新编译，这样开发过程中就不用出现错误就得手动删除缓存文件了。
在网上找了一下。刚开始以为 token_get_all()函数能处理语法错误的问题，结果发现，它只是做简单的词法分析。没有办法。后来到论坛上去问了一下
http://groups.google.com/group/professional-php/browse_thread/thread/b8581f6b07b10ff0/2601a63c406bb1c1?lnk=gst&#38;q=reeze#2601a63c406bb1c1
有人告诉我有这样一个函数 php_check_syntax() http://www.php.net/manual/en/function.php-check-syntax.php 我想问题就这么坚决了。。我真应该RTF(Read The Fuck Mannual). 仔细一看。这个函数已近被弃用了：
Note: For technical reasons, this function is deprecated and removed from PHP. Instead, use php -l somefile.php from the commandline.
这个technical reason 到底是什么呢？ 先不管了，以后再慢慢研究，反正不能使用这个方法就对了。
他们的建议是使用命令行$php -l filename.php 来检查语法。
Gary Every给了我一个代码片段参考：
在命令行下检查问题也不大。如果我要放在在线应用呢？ 这就涉及到可移植性的问题了。首先是操作系统，然后就是环境变量。这样的话就会依赖于服务器端的配置。在http://www.php.net/manual/en/function.php-check-syntax.php 上有人贴出了自己的php_check_syntax()函数实现。
有的采用的就是上面的命令行的方法。
后面有提到使用eval的方法来验证。eval方法会执行传入的代码， 如果代码有语法错误则会抛出parser error, 可以使用&#8217;@'错误抑制符去掉错误信息，eval和echo一样并不是函数，不能使用变量函数的方法调用比如：
$func = &#8216;eval&#8217;
$func()这样的调用就是无效的。它会提示没有eval函数，如果你自己定义这么一个函数也是有问题的。因为eval是一个关键字。
eval调用和include差不多，如果被包含文件中没有明确return就返回null。如果直接eval我们需要检查的文件会造成被检查的文件内代码被执行，这可不是我们想要的，我们只需要检查一下这个文件的语法是否正确。 我们可以在要检查的文件之前添加return 语句，让代码提前跳出，那么后面的代码就不会执行了。好的，就这么干。代码如下：
checker.php
123456789101112131415161718192021222324&#60;?php

if&#40;!function_exists&#40;'php_check_syntax'&#41;&#41; &#123;
&#160; &#160; function php_check_syntax&#40;$file_name, &#38;$error_message = null&#41; &#123;
&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>之前在当当的时候的一个项目中用到了一个简单的模板引擎，其实也是借鉴discuz来做的模板引擎，很简单，它所作的事情就是把一些自定义的标签编译成php代码。已经说了很简单了，所以编译的时候也名优进行模板语法的检查，那么在开发过程中就会出现编译出来的php文件有语法问题，有语法问题没有关系，我修改重新编译一下就好了。首先不能在每次请求的时候都把php模板重新编译一下，会严重影响性能，折中的处理时在每个编译好的php文件末尾检查一下该模板文件是否已经修改过，根据设定的更新频率，如果又需要则重新编译模板文件，现在的问题是编译出来的php文件自己有语法错误，根本执行不到模板检查那一步，所以即使修改了模板文件中的问题也不会重新编译。 所以我想寻找一种简单的方法来检查生成的php文件是否合法。不合法就重新编译，这样开发过程中就不用出现错误就得手动删除缓存文件了。</p>
<p>在网上找了一下。刚开始以为 token_get_all()函数能处理语法错误的问题，结果发现，它只是做简单的词法分析。没有办法。后来到论坛上去问了一下</p>
<p>http://groups.google.com/group/professional-php/browse_thread/thread/b8581f6b07b10ff0/2601a63c406bb1c1?lnk=gst&amp;q=reeze#2601a63c406bb1c1</p>
<p>有人告诉我有这样一个函数 php_check_syntax() http://www.php.net/manual/en/function.php-check-syntax.php 我想问题就这么坚决了。。我真应该RTF(Read The Fuck Mannual). 仔细一看。这个函数已近被弃用了：<br />
Note: For technical reasons, this function is deprecated and removed from PHP. Instead, use php -l somefile.php from the commandline.</p>
<p>这个technical reason 到底是什么呢？ 先不管了，以后再慢慢研究，反正不能使用这个方法就对了。<br />
他们的建议是使用命令行$php -l filename.php 来检查语法。<br />
Gary Every给了我一个代码片段参考：</p>
<p>在命令行下检查问题也不大。如果我要放在在线应用呢？ 这就涉及到可移植性的问题了。首先是操作系统，然后就是环境变量。这样的话就会依赖于服务器端的配置。在http://www.php.net/manual/en/function.php-check-syntax.php 上有人贴出了自己的php_check_syntax()函数实现。<br />
有的采用的就是上面的命令行的方法。<br />
后面有提到使用eval的方法来验证。eval方法会执行传入的代码， 如果代码有语法错误则会抛出parser error, 可以使用&#8217;@'错误抑制符去掉错误信息，eval和echo一样并不是函数，不能使用变量函数的方法调用比如：<br />
$func = &#8216;eval&#8217;<br />
$func()这样的调用就是无效的。它会提示没有eval函数，如果你自己定义这么一个函数也是有问题的。因为eval是一个关键字。<br />
eval调用和include差不多，如果被包含文件中没有明确return就返回null。如果直接eval我们需要检查的文件会造成被检查的文件内代码被执行，这可不是我们想要的，我们只需要检查一下这个文件的语法是否正确。 我们可以在要检查的文件之前添加return 语句，让代码提前跳出，那么后面的代码就不会执行了。好的，就这么干。代码如下：<br />
checker.php</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:97%;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'php_check_syntax'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> php_check_syntax<span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_name</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$error_message</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$file_content</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$check_code</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;return true; ?&gt;&quot;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$file_content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$check_code</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file_content</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;?php &quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!@</span><a href="http://www.php.net/eval"><span style="color: #990000;">eval</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_content</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$error_message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;file: &quot;</span> <span style="color: #339933;">.</span> <a href="http://www.php.net/realpath"><span style="color: #990000;">realpath</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; have syntax error&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>php_check_syntax<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file.php&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$msg</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Woohoo, OK!&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>file.php</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:97%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">foreach</span><span style="color: #339933;">::</span> <span style="color: #004000;">a</span> <span style="color: #339933;">=&gt;</span> b<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>因为Parse error 是没法被 set_error_handler处理函数处理的。这个异常没办法catch到。所以才使用了@来抑制错误。这带来的问题就是我们无法得到详细的错误信息。 不过目前我需要的功能也只是检查语法是否正确。不正确的话重新编译模板文件，就这么简单，至于语法错误，在显示网页的时候自然会看得到。<br />
最好的办法就是这个被遗弃的php_check_syntax这个方法回到php中。下次再研究下他们是出于什么原因把这个函数去掉的。<br />
////////思维很混乱，写的每一点条理性，谁让我语文那么烂涅。</p>
]]></content:encoded>
			<wfw:commentRss>http://reeze.cn/2009/10/09/check-php-files-syntax-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP5.2.6中无法在exception_handler函数中抛出异常</title>
		<link>http://reeze.cn/2009/06/25/php5-2-6%e4%b8%ad%e6%97%a0%e6%b3%95%e5%9c%a8exception_handler%e5%87%bd%e6%95%b0%e4%b8%ad%e6%8a%9b%e5%87%ba%e5%bc%82%e5%b8%b8/</link>
		<comments>http://reeze.cn/2009/06/25/php5-2-6%e4%b8%ad%e6%97%a0%e6%b3%95%e5%9c%a8exception_handler%e5%87%bd%e6%95%b0%e4%b8%ad%e6%8a%9b%e5%87%ba%e5%bc%82%e5%b8%b8/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 03:03:50 +0000</pubDate>
		<dc:creator>reeze</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[exception]]></category>

		<guid isPermaLink="false">http://reeze.yo2.cn/?p=32551</guid>
		<description><![CDATA[在PHP bugs列表中也找到这个bug，但是似乎没有被处理，bug提出的时间是2005年，不知道新版本的有没有解决。
PHP：5.2.6
OS: Mac OS Leopard 10.5.7
Server: Apache 2.2
这个代码就有问题：
function e_handler($e)
{
throw new Exception();
}
set_exception_handler(&#8216;e_handler&#8217;);
throw new Exception();
这将会导致
Fatal error: Exception thrown without a stack frame in Unknown on line 0
Update: 这应该属于设计问题，如果在exception_handler()函数中可以跑出异常，则这个异常优惠调用exception_handler(),这样下去就会出现死循环，这就是为什么程序会出错的原因吧。
通过try catch来处理的话就没有问题。。
function e_handler($e)
{
try
{
throw new Exception();
}
catch (Exception $e)
{
echo &#8220;catched&#8230;&#8221;;
}
}
set_exception_handler(&#8216;e_handler&#8217;);
throw new Exception();
]]></description>
			<content:encoded><![CDATA[<p>在PHP bugs列表中也找到这个bug，但是似乎没有被处理，bug提出的时间是2005年，不知道新版本的有没有解决。<br />
PHP：5.2.6<br />
OS: Mac OS Leopard 10.5.7<br />
Server: Apache 2.2</p>
<p>这个代码就有问题：<br />
function e_handler($e)<br />
{<br />
throw new Exception();<br />
}<br />
set_exception_handler(&#8216;e_handler&#8217;);<br />
throw new Exception();</p>
<p>这将会导致<br />
Fatal error: Exception thrown without a stack frame in Unknown on line 0</p>
<p><span style="color: #008000;">Update: 这应该属于设计问题，如果在exception_handler()函数中可以跑出异常，则这个异常优惠调用exception_handler(),这样下去就会出现死循环，这就是为什么程序会出错的原因吧。</span><br />
通过try catch来处理的话就没有问题。。</p>
<p>function e_handler($e)<br />
{<br />
try<br />
{<br />
throw new Exception();<br />
}<br />
catch (Exception $e)<br />
{<br />
echo &#8220;catched&#8230;&#8221;;<br />
}<br />
}<br />
set_exception_handler(&#8216;e_handler&#8217;);</p>
<p>throw new Exception();</p>
]]></content:encoded>
			<wfw:commentRss>http://reeze.cn/2009/06/25/php5-2-6%e4%b8%ad%e6%97%a0%e6%b3%95%e5%9c%a8exception_handler%e5%87%bd%e6%95%b0%e4%b8%ad%e6%8a%9b%e5%87%ba%e5%bc%82%e5%b8%b8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP调试函数</title>
		<link>http://reeze.cn/2009/06/19/a-php-debug-function/</link>
		<comments>http://reeze.cn/2009/06/19/a-php-debug-function/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 12:05:43 +0000</pubDate>
		<dc:creator>reeze</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[debug]]></category>

		<guid isPermaLink="false">http://reeze.yo2.cn/?p=32031</guid>
		<description><![CDATA[在项目中经常要调试程序，但是我电脑上的ZendStudio总是没配置好，不能单步调试，不过有时候不一定需要让ZendStudio来帮我们调试，所以写了下面这个辅助函数来方便调试，因为有时候调试的位置加多了自己也不知道到底是加在什么地方了，下面的函数就是方便的dump对象信息，同时显示调试的问题和所在的行数。
123456789101112131415161718//调试函数,方便显示调试函数的位置和文件
function p&#40;&#41;&#123;
&#160; $args = func_get_args&#40;&#41;;

&#160; &#160;// 调用栈,debug_backtrace()可以返回调用栈。这样 我们就可以方便的知道函数在哪里调用的。
&#160; $backtrace = debug_backtrace&#40;&#41;;

&#160; $file = $backtrace&#91;0&#93;&#91;'file'&#93;;
&#160; $line = $backtrace&#91;0&#93;&#91;'line'&#93;;
&#160; echo &#34;&#60;pre&#62;&#34;;
&#160; echo &#34;$file:$line\n&#34;;
&#160; foreach &#40;$args as $arg&#41;
&#160; &#123;
&#160; &#160; var_dump&#40;$arg&#41;;
&#160; &#125;
&#160; echo &#34;&#60;/pre&#62;&#34;;
&#160; exit;
&#125;
]]></description>
			<content:encoded><![CDATA[<p>在项目中经常要调试程序，但是我电脑上的ZendStudio总是没配置好，不能单步调试，不过有时候不一定需要让ZendStudio来帮我们调试，所以写了下面这个辅助函数来方便调试，因为有时候调试的位置加多了自己也不知道到底是加在什么地方了，下面的函数就是方便的dump对象信息，同时显示调试的问题和所在的行数。</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:97%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//调试函数,方便显示调试函数的位置和文件</span><br />
<span style="color: #000000; font-weight: bold;">function</span> p<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/func_get_args"><span style="color: #990000;">func_get_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// 调用栈,debug_backtrace()可以返回调用栈。这样 我们就可以方便的知道函数在哪里调用的。</span><br />
&nbsp; <span style="color: #000088;">$backtrace</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/debug_backtrace"><span style="color: #990000;">debug_backtrace</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$backtrace</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'file'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$line</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$backtrace</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'line'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;pre&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$file</span>:<span style="color: #006699; font-weight: bold;">$line</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$arg</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/var_dump"><span style="color: #990000;">var_dump</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/pre&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://reeze.cn/2009/06/19/a-php-debug-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->