Yup, you can do that with just about any set of languages, right?
Maybe it also work for computationally equivalent (simulation/emulation) math where you're decompiling the machine language into a stream of logical NORs or such. That might connect more languages.
function isEven($number) {
return $number % 2 == 0;
}
That's actually valid PHP code and JavaScript. But I think you'll need to use eval on that in the PHP vm because it won't have the `<?php`A way to avoid this is to use the HTML comment notation, JavaScript just ignores it (until end of line), so just:
<!-- <?php echo "-->";