<?php ob_start(); $A = '<?php echo "Output"; ?>'; eval(" ?> $A <?php "); $B = ob_get_clean(); echo $B; ?>