<?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; memory_get_usage</title>
	<atom:link href="http://www.zui88.com/view-tag/memory_get_usage/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zui88.com/blog</link>
	<description>中山php&#124;最优网络</description>
	<lastBuildDate>Mon, 13 May 2013 04:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>php计算代码运行时间和使用内存</title>
		<link>http://www.zui88.com/blog/view-415.html</link>
		<comments>http://www.zui88.com/blog/view-415.html#comments</comments>
		<pubDate>Wed, 14 Nov 2012 08:28:49 +0000</pubDate>
		<dc:creator>lin</dc:creator>
				<category><![CDATA[后端程序]]></category>
		<category><![CDATA[memory_get_usage]]></category>

		<guid isPermaLink="false">http://www.zui88.com/blog/?p=415</guid>
		<description><![CDATA[&#60;?php //开始计时 $HeaderTime = microtime(true);//参数true表示返回浮点数值 //代码 //... printf(" total run: %.2f s&#60;br&#62;". "memory usage: %.2f M&#60;br&#62; ", microtime(true)-$HeaderTime, memory_get_usage() / 1024 / 1024 ); ?&#62; 结果： total runtime: 1.47 s memory usage: 77.09 M]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zui88.com/blog/wp-admin/tools.php"></a></p>
<p><span style="font-size: small;"> &lt;?php</span></p>
<p><span style="font-size: small;">//开始计时</span></p>
<p><span style="font-size: small;"><br />
$HeaderTime = </span><span style="font-size: small;">micro<a href="http://www.linuxso.com/command/time.html" target="_blank"><span style="text-decoration: underline;">time</span></a>(true);//参数true表示返回浮点数值</span></p>
<p><span style="font-size: small;"> </span><span style="font-size: small;">//代码</span></p>
<p>//...</p>
<p><span style="font-size: small;">printf("    total run: %.2f s&lt;br&gt;".<br />
"memory usage: %.2f M&lt;br&gt; ",<br />
micro<a href="http://www.linuxso.com/command/time.html" target="_blank"><span style="text-decoration: underline;">time</span></a>(true)-$HeaderTime,<br />
memory_get_usage() / 1024 / 1024 );<br />
?&gt;<br />
结果：</span></p>
<p><span style="font-size: small;"> total runtime: 1.47 s</span></p>
<p><span style="font-size: small;">memory usage: 77.09 M </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zui88.com/blog/view-415.html/feed</wfw:commentRss>
		<slash:comments>454</slash:comments>
		</item>
	</channel>
</rss>
