Post History
PHP, 58 28 bytes P1: <?="<?=\$argv[1]+$argv[1];"; Try it online! Golfed 30 bytes thanks to @Shaggy's advice. P2 (given I inputted 10): <?=$argv[1]+10; Try it online!
Answer
#2: Post edited
# [PHP], 58 bytes- P1:
- <!-- language-all: lang-php -->
<?php echo"<?php echo(int)fgets(STDIN)+".fgets(STDIN).";";[Try it online!][TIO-kte5zngd]- [PHP]: https://php.net/
[TIO-kte5zngd]: https://tio.run/##K8go@P/fxr4go0AhNTkjXwnB1MjMK9FMS08tKdYIDnHx9NPUVtJD5uopWStZ//9vaAAA "PHP – Try It Online"- P2 (given I inputted `10`):
- <!-- language-all: lang-php -->
<?php echo(int)fgets(STDIN)+10;[Try it online!][TIO-kte60ivs]- [PHP]: https://php.net/
[TIO-kte60ivs]: https://tio.run/##K8go@P/fxr4go0AhNTkjXyMzr0QzLT21pFgjOMTF009T29DA@v9/QyMA "PHP – Try It Online"
- # [PHP], <s>58</s> 28 bytes
- P1:
- <!-- language-all: lang-php -->
- <?="<?=\$argv[1]+$argv[1];";
- [Try it online!][TIO-kteaev94]
- Golfed 30 bytes thanks to [**@Shaggy**](https://codegolf.codidact.com/users/53588)'s [advice](https://codegolf.codidact.com/comments/thread/4457#comment-13518).
- [PHP]: https://php.net/
- [TIO-kteaev94]: https://tio.run/##K8go@P/fxt5WCYhjVBKL0suiDWO1YQxrJev///8bGgAA "PHP – Try It Online"
- P2 (given I inputted `10`):
- <!-- language-all: lang-php -->
- <?=$argv[1]+10;
- [Try it online!][TIO-kteah38l]
- [PHP]: https://php.net/
- [TIO-kteah38l]: https://tio.run/##K8go@P/fxt5WJbEovSzaMFbb0MD6////hkYA "PHP – Try It Online"
#1: Initial revision
# [PHP], 58 bytes P1: <!-- language-all: lang-php --> <?php echo"<?php echo(int)fgets(STDIN)+".fgets(STDIN).";"; [Try it online!][TIO-kte5zngd] [PHP]: https://php.net/ [TIO-kte5zngd]: https://tio.run/##K8go@P/fxr4go0AhNTkjXwnB1MjMK9FMS08tKdYIDnHx9NPUVtJD5uopWStZ//9vaAAA "PHP – Try It Online" P2 (given I inputted `10`): <!-- language-all: lang-php --> <?php echo(int)fgets(STDIN)+10; [Try it online!][TIO-kte60ivs] [PHP]: https://php.net/ [TIO-kte60ivs]: https://tio.run/##K8go@P/fxr4go0AhNTkjXyMzr0QzLT21pFgjOMTF009T29DA@v9/QyMA "PHP – Try It Online"