Question 16
Which of the following will set a 10 seconds read timeout for a stream?
- ini_set("default_socket_timeout", 10);
- stream_read_timeout($stream, 10);
- Specify the timeout as the 5th parameter to the fsockopen() function used to open a stream
- stream_set_timeout($stream, 10);
- None of the above
Question 17
What function allows resizing of PHP's file write buffer?
- ob_start()
- set_write_buffer()
- stream_set_write_buffer()
- Change the output_buffering INI setting via ini_set() function
Question 18
What does the __FILE__ constant contain?
- The filename of the current script.
- The full path to the current script.
- The URL of the request made.
- The path to the main script.
Question 19
What can prevent PHP from being able to open a file on the hard drive (Choose 2)?
- File system permissions
- File is outside of open_basedir
- File is inside the /tmp directory.
- PHP is running in CGI mode.
Question 20
What purpose do namespaces fulfill?
- Encapsulation
- Alternative to classes
- Improved performance
- All of the above