OK look:
What I want to do is the following (this is an example):
- $output = require( "script_execution.php" );
- echo str_replace( "hello", "bye", $output );
The solution I have:
(script_execution.php)
<?php
echo "hello world....";
?>
(solution.php)
<?php
ob_start();
require( "script_execution.php" );
$output = ob_get_contents();
ob_end_clean();
echo $output; // WOW!!! but.......................
?>
(output)
bye world....
Here is the problem: That solution works fine but, ¿What happens if "script_execution.php" has an (exit;) ??? The final output will be wrong because before the third instruction all execution running is stopped.
¿What can I do to get the final output of "script_execution.php" without exit my script (solution.php)? Because as you know, the final output of script_execution.php (independent of the exit; instruction) is:
hello world....
Thanks! (maybe using threads??)