PHP

An educational, engaging illustration depicting various PHP programming concepts, including arrays, cookies, and exceptions, with a bright and inviting design.

PHP Proficiency Quiz

Test your knowledge and understanding of PHP with our engaging quiz! Whether you're a beginner or looking to brush up on your skills, this quiz covers a range of topics that every PHP developer should know.

  • 10 multiple choice questions
  • Instant feedback on your answers
  • Perfect for developers at all levels
10 Questions2 MinutesCreated by CodingWizard42
1. Which keyword is used to refer to properties or methods within the class itself?
A) private
B) public
C) protected
D) $this
2. What is the output of above code?
A) Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
B) Array ( [a] => a [b] => b [c] => c [d] => d )
C) Array ( [red] => a [green] => b [blue] => c [yellow] => d )
D) Array ( [a] => red [b] => green [c] => blue [d] => yellow )
3. How many types of filtering are present in PHP?
A) 3
B) 2
C) 4
D) None
4. Which one of the following is the right description for the method getMessage() ?
A) throws new Exception();
B) throw new Exception();
C) new Exception();
D) new throws Exception();
5. What will be the output of the above PHP code ?
A) qwe12345rty
B) qwe{$a}rty
C) error
D) no output
6.What in_array() function does in PHP ?
A) Check whether array is declared
B) Checks if a value exists in an array
C) Both a and b
D) Both a and b
7. How to set Cookie in PHP?
A) cookie(name,value);
B) setcookie(name,value);
C) $cookie(name,value,time);
D) All of the above
8. Which of the following statement are correct.
A) time() + 60*60*100 returns the current date and time plus two hour.
B) time() + 60*60 returns the current date and time plus one hour.
C) time() + 24*60*60 returns the current date and time plus one day.
D) Both b and c.
9. What will be the output of the following PHP code ?
A) hi
B) no output
C) error
D) how are u
10. What does SPL stand for?
A) Standard PHP Library
B) Source PHP Library
C) Standard PHP List
D) Source PHP List
{"name":"PHP", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge and understanding of PHP with our engaging quiz! Whether you're a beginner or looking to brush up on your skills, this quiz covers a range of topics that every PHP developer should know.10 multiple choice questionsInstant feedback on your answersPerfect for developers at all levels","img":"https:/images/course8.png"}
Powered by: Quiz Maker