Zend PHP 5.3 Certification Exam
Functions and Arrays
Object Oriented Programming
Data Format & Types
Strings and Patterns
Databases and SQL
Web Features 1
If you want to read exactly one byte of a file. Which of the following functions will you use to accomplish the task?
Each correct answer represents a complete solution. Choose two.
Answer options A and B are correct.
If you want to read only one byte of a file, you need to use either fread() or fgetc() function. fread() function reads up to length bytes from the file pointer. The fgetc() function gets a character from the given file pointer.
Answer options C and D are incorrect. The fgets() and fgetss() functions will return the string up to length -1 bytes (means 1-1 = 0 bytes).
© 2013 Zend PHP Certification Exam