<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Stops xhprof profiler</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.xhprof.html">Xhprof Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xhprof-enable.html">xhprof_enable</a></div> <div class="up"><a href="ref.xhprof.html">Xhprof Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.xhprof-disable" class="refentry"> <div class="refnamediv"> <h1 class="refname">xhprof_disable</h1> <p class="verinfo">(PECL xhprof >= 0.9.0)</p><p class="refpurpose"><span class="refname">xhprof_disable</span> — <span class="dc-title">Stops xhprof profiler</span></p> </div> <div class="refsect1 description" id="refsect1-function.xhprof-disable-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>xhprof_disable</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Stops the profiler, and returns xhprof data from the run. </p> </div> <div class="refsect1 parameters" id="refsect1-function.xhprof-disable-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-function.xhprof-disable-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> An <span class="type"><a href="language.types.array.html" class="type array">array</a></span> of xhprof data, from the run. </p> </div> <div class="refsect1 examples" id="refsect1-function.xhprof-disable-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-587"> <p><strong>Example #1 <span class="function"><strong>xhprof_disable()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />xhprof_enable</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$foo </span><span style="color: #007700">= </span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo bar"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$xhprof_data </span><span style="color: #007700">= </span><span style="color: #0000BB">xhprof_disable</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$xhprof_data</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Array ( [main()==>strlen] => Array ( [ct] => 1 [wt] => 279 ) [main()==>xhprof_disable] => Array ( [ct] => 1 [wt] => 9 ) [main()] => Array ( [ct] => 1 [wt] => 610 ) ) </pre></div> </div> </div> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.xhprof.html">Xhprof Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xhprof-enable.html">xhprof_enable</a></div> <div class="up"><a href="ref.xhprof.html">Xhprof Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>