#PHP → JavaScript (ES6), 20 24 bytes#
PHP → JavaScript (ES6), 20 24 bytes
Reading from STDIN is always expensive in PHP. It looks a bit strange:
x=>x+<?fgets(STDIN);
It prints x=>x+
and waits for user input to complete the string, terminates with the complete anonymous JavaScript function, e.g. x=>x+2
.
First version (24 bytes)
<?='x=>x+'.fgets(STDIN);