Q. Which of the following function is used to get the ASCII value of a character in PHP?

  • (A) val()
  • (B) asc()
  • (C) ascii()
  • (D) chr()
πŸ’¬ Discuss
βœ… Correct Answer: (D) chr()

Q. Which of the following function is used to unset a variable in PHP?

  • (A) delete()
  • (B) unset()
  • (C) unlink()
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) unset()

Q. Which of the following function is used to sort an array in descending order?

  • (A) sort()
  • (B) asrot()
  • (C) dsort()
  • (D) rsort()
πŸ’¬ Discuss
βœ… Correct Answer: (D) rsort()

Q. Which of the following is/are the code editors in PHP?

  • (A) Notepad
  • (B) Notepad++
  • (C) Adobe Dreamweaver
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Which of the following is used to end a statement in PHP?

  • (A) . (dot)
  • (B) ; (semicolon)
  • (C) ! (exclamation)
  • (D) / (slash)
πŸ’¬ Discuss
βœ… Correct Answer: (B) ; (semicolon)

Q. Which of the following function in PHP can be used to test the type of any variable?

  • (A) showtype()
  • (B) gettype()
  • (C) settype()
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) gettype()

Q. String values in PHP must be enclosed within

  • (A) Double Quotes
  • (B) Single Quotes
  • (C) Both (a) and (b)
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both (a) and (b)

Q. Which of the following variable name is invalid?

  • (A) $newVar
  • (B) $new_Var
  • (C) $new-var
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) $new-var

Q. Which of the following is the correct way to create an array in PHP?

  • (A) $season = array["summer" , "winter" , "spring" , "autumn"];
  • (B) $season = array("summer" , "winter" , "spring" , "autumn");
  • (C) $season = "summer" , "winter" , "spring" , "autumn";
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) $season = array("summer" , "winter" , "spring" , "autumn");

Q. Which of the following is a built-in function in PHP that adds a value to the end of an array?

  • (A) array_push()
  • (B) inend_array()
  • (C) into_array()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) array_push()