Q. What will be the output?

Code:
$a = fopen('php://temp', 'r+');
fwrite($a, 'abc');
rewind($a);
echo fread($a, 2);
  • (A) ab
  • (B) abc
  • (C) Error
  • (D) NULL
πŸ’¬ Discuss
βœ… Correct Answer: (A) ab
Explanation: Reads first 2 characters.
Explanation by: Roshan
Reads first 2 characters.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
47
Total Visits
πŸ“½οΈ
7 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
94%
Success Rate