How to RAW print a function?
<p>I have a php module (.so) who has a function called <code>do_something()</code>.</p>

<p>When you execute this function on a browser it tells you can only use it on the command line.
If I run this function on the command line a bash script is executed.
Is there any way I can grab the SOURCE of this bash script?</p>

<p>Let's make an example.</p>

<pre><code>&lt;?php
    //foo.php
    do_something();
?&gt;
</code></pre>

<p>If I run <code>php foot.php</code> a bash script is executed.  I want the source file of this bash script.</p>

<p>I've tried with <code>php foot.php &gt; script.txt</code> but it only prints the STDOUT of the script.</p>

<p>I think that for working around it I need to wrap the <strong>do_something()</strong> function inside some other php function for printing the <strong>raw</strong> function.</p>