Home > PHP & Programming > Quizzes > PHP 5 Fundamentals Test
PHP 5 Fundamentals Test
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 31% Most missed: “How do you connect mysql with the use of PHP5 new functions?”
PHP 5 Fundamentals Test
Time left 00:00
25 Questions

1. The contents of an image file are stored in memory as $imString - but the original file is not available. Of the following - which uses the least amount of code and is a valid method of retrieving the dimensions of $imString?
2. How to check if a directory exists?
3. How can we delete a file using php function.
4. How do you instantiate a new object from class foo? class foo { function do_foo() { echo 'Doing foo.'; } }
5. $i = 5; print $i++ + ++$i;
6. Which of the following variables is not related to file upload?
7. How to open file in read/write mode?
8. In mail($param1 - $param2 - $param3 - $param4) - the $param2 contains:
9. In mail($param1 - $param2 - $param3 - $param4) - the $param2 contains:
10. Which of these functions will not result in a runtime error if the file requested does not exist or can't be opened?
11. function foobar( ) { $a = func_get_args( ); return $a[2]; } print foobar('a' - 1 - 'b' - 2); What would the output be?
12. How do you connect mysql with the use of PHP5 new functions?
13. True or false? One can include (??????abc.PHP??????) two times in a PHP page ??????makeit.PHP??????.
14. Which of the following is NOT supported in PHP5?
15. What is output of the following code. $arr = 'a'; $arr[0]='b'; echo $arr; echo $arr[0];
16. Which of the following functions allows you to store session data in a database?
17. How can you enable the cURL extension?
18. What is the correct way to open the file 'time.txt' as readable?
19. What will be the output of the following code: sayHello($c);
20. How do you make PHP use a class file without having to require or include it manually?
21. Which subversion of PHP5 adds short array syntax?
22. Which of the following functions set options in curl script?
23. How do you make PHP use a class file without having to require or include it manually?
24. Which variable type can NOT be used as a type hint?
25. What visibility level will this class property get in PHP5? var $cool = true;