Q. What will be the output?
Code:
$a = fopen('php://temp', 'r+');
fwrite($a, 'abc');
rewind($a);
echo fread($a, 2);
β
Correct Answer: (A)
ab
Explanation: Reads first 2 characters.