document.write("
<?php function add() { $a = 10; $b = 20; $GLOBALS['sum'] = $a + $b;} add();echo $sum;