Require_once to variable

Posted by swamprunner7 on Stack Overflow See other posts from Stack Overflow or by swamprunner7
Published on 2010-05-13T21:15:22Z Indexed on 2010/05/13 21:24 UTC
Read the original article Hit count: 168

Filed under:
|

I want to call require_once("test.php") but not display result and save it into variable like this:

//pseudocode
$test = require_once('test.php');

//some operations like $test = preg_replace(…);

echo $test;

Is it possible?

© Stack Overflow or respective owner

Related posts about php

Related posts about files