<?php
$js = "function prova(){
alert('{$_SERVER['SERVER_NAME']}');
}";
print $js;
?>