3 ms·
No, but another one you can do it in is PHP and JavaScript function isEven($number) { return $number % 2 == 0; } That's actually valid PHP cod
by ryanlm 10y ago
No, but another one you can do it in is PHP and JavaScript
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`
- mikeryan 10y agoYou can use the same trick used here of hiding the PHP tags behind the comments /*<?php
- ivanca 10y agoActually that trick creates some residual garbage (the slash and the asterisk would be printed in 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 "-->";