I tried heredocs, but I think heredocs don't support PHP codes.

For example

$php = <<<phpcode
<?php
$var = 'This is a var';
$time = 2;
?>
phpcode;

That didn't work.. how do I hold php codes inside a variable?
Thanks.
But there not like the example above they are much longer variables.. for example..

$roundedtime = round($totaltime,$round);

Would I put that into an array?
Thanks, I keep confusing myself with functions and arrays.