PHP require return echo?
<p>Is it possible to require a php file and get all the things that's echo'ed to be returned and stored into a variable?</p>

<p>Example:</p>

<pre><code>//file1.php
// let's say $somevar = "hello world"
&lt;p&gt;&lt;?php echo $somevar; ?&gt;&lt;/p&gt;


//file2.php
$file1 = getEchoed("file1.php");
// I know getEchoed don't exist, but i'm unsure how to do it.
</code></pre>
