You might be able to have one interact with the other by keeping them as separate scripts/files, and invoking one from the other via the shell (e.g. PHP's shell_exec()) or via cURL, but they won't co-exist in the same file. Or depending on what you need to do, you might use AJAX on the client side to populate a particular part of the page via a script in the other language.