fscanf(STDIN, "%d %d\n", $a, $b); //Reads 2 numbers from STDIN echo ($a + $b) . "\n";