<!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 sample profiler</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xhprof-enable.html">xhprof_enable</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xhprof-sample-enable.html">xhprof_sample_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-sample-disable" class="refentry"> <div class="refnamediv"> <h1 class="refname">xhprof_sample_disable</h1> <p class="verinfo">(PECL xhprof >= 0.9.0)</p><p class="refpurpose"><span class="refname">xhprof_sample_disable</span> — <span class="dc-title">Stops xhprof sample profiler</span></p> </div> <div class="refsect1 description" id="refsect1-function.xhprof-sample-disable-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>xhprof_sample_disable</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Stops the sample mode xhprof profiler, and </p> </div> <div class="refsect1 parameters" id="refsect1-function.xhprof-sample-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-sample-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 sample data, from the run. </p> </div> <div class="refsect1 examples" id="refsect1-function.xhprof-sample-disable-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-589"> <p><strong>Example #1 <span class="function"><strong>xhprof_sample_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_sample_enable</span><span style="color: #007700">();<br /><br />for (</span><span style="color: #0000BB">$i </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">$i </span><span style="color: #007700"><= </span><span style="color: #0000BB">10000</span><span style="color: #007700">; </span><span style="color: #0000BB">$i</span><span style="color: #007700">++) {<br /> </span><span style="color: #0000BB">$a </span><span style="color: #007700">= </span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$i</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">$b </span><span style="color: #007700">= </span><span style="color: #0000BB">$i </span><span style="color: #007700">* </span><span style="color: #0000BB">$a</span><span style="color: #007700">;<br /> </span><span style="color: #0000BB">$c </span><span style="color: #007700">= </span><span style="color: #0000BB">rand</span><span style="color: #007700">();<br />}<br /><br /></span><span style="color: #0000BB">$xhprof_data </span><span style="color: #007700">= </span><span style="color: #0000BB">xhprof_sample_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 ( [1272935300.800000] => main() [1272935300.900000] => main() ) </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="function.xhprof-enable.html">xhprof_enable</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xhprof-sample-enable.html">xhprof_sample_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>