Zend
200-530 · Question #549
Consider the following PHP script: <?php $fp = fopen('file.txt', 'r'); $string1 = fgets($fp, 512); fseek($fp, 0); ?> Which of the following functions will give the same output as that given by the…
The correct answer is C. rewind(). See the full explanation below for the reasoning.
Question
Consider the following PHP script: <?php $fp = fopen('file.txt', 'r'); $string1 = fgets($fp, 512); fseek($fp, 0); ?> Which of the following functions will give the same output as that given by the fseek() function in the above script?
Options
- Afgetss()
- Bfgets()
- Crewind()
- Dfile()
How the community answered
(33 responses)- A9% (3)
- B3% (1)
- C82% (27)
- D6% (2)
Community Discussion
No community discussion yet for this question.