I am sorry to say there is no way to call the function inform(), written in Javascript within php code.
This is not entirly true, tho PHP does not technically allow you to call client side scripts, you can have php print html code that does. So I would say PHP is capible of running JavaScript through the use of HTML.
Getting a value from the JavaScript method would be impossible tho without some trickery.
For example:
[HTML]
<script language="javascript">
function MessageBox(message) {
alert(message);
}
</script>
<?php
echo "<script language='javascript'> MessageBox('Hello'); </script>";
?>
[/HTML]
If you needed the JavaScrip method to return a value you could, for example, have JavaScript refresh the page and pass the value throught the HTTP GET protocol.