I've created a small MVC framework in PHP. Pages are created dynamically, and are then returned to the client/browser.
At this moment I create the entire file (HTML output) in the variable $content.
Next, I write this content in a temporary file, and require this file, thus returning the content to the client.
Now, I was wondering... Can't I just send it from memory, i.e. just echo-ing the variable:
<?php ... echo $content; ... ?> Is this effectively the same as writing it to a temp file and then requiring/including it, only faster? Or do you have any better tips?