PHP MCQ-String Functions,Working with Files,Sessions and Cookies

MCQ Paper

1. What does the strlen() function return?





2. What is the output of str_replace("world", "PHP", "Hello world")?





3. What does the explode() function do?





4. Which function is used to convert all characters in a string to lowercase?





5. What does the fopen() function do?





6. Which mode opens a file for writing only and erases the content if it exists?





7. What does fwrite() do in PHP?





8. What is the main purpose of PHP sessions?





9. Which function starts a session in PHP?





10. How do you set a cookie in PHP?





Wait for 20 seconds...

Post a Comment

Previous Post Next Post