Technically impossible. However, you can make an AJAX call to the PHP page and get the values returned by it.
PHP (test.php):
<?php
$x = 10;
$y = 20;
$val = $y / $x;
echo $val;
?>
Javascript ( jQuery ):
$(document).ready(function() {
$.ajax({url: 'test.php',
type: 'POST',
success: function(data){
$('#someElement').html(data);
}
});
As for calling exit();and creating a page on which JavaScript stop processing is performed, you simply cannot, unless you control the logic on the same page in PHP and call exit();from there.