Q. Which of the following function in PHP returns a text in title case from a variable?

  • (A) toUpper($var)
  • (B) ucwords($var)
  • (C) ucword($var)
  • (D) All
πŸ’¬ Discuss
βœ… Correct Answer: (B) ucwords($var)

Q. Which of the following is the correct way to print "Hello World" in PHP?

  • (A) "Hello World";
  • (B) write("Hello World");
  • (C) echo "Hello World";
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) echo "Hello World";

Q. Which of the following function is used to compress a string in PHP?

  • (A) compress()
  • (B) zip_compress()
  • (C) gzcompress()
  • (D) zip()
πŸ’¬ Discuss
βœ… Correct Answer: (C) gzcompress()

Q. Which of the following function converts a string to all uppercase?

  • (A) upper()
  • (B) uppercase()
  • (C) struppercase()
  • (D) strtoupper()
πŸ’¬ Discuss
βœ… Correct Answer: (D) strtoupper()

Q. The function in PHP that can be used to concatenate array elements to form a single delimited string is

  • (A) implode()
  • (B) concat()
  • (C) explode()
  • (D) concatenate()
πŸ’¬ Discuss
βœ… Correct Answer: (A) implode()

Q. Which PHP function determines the last access time of a file?

  • (A) filetime()
  • (B) fileatime()
  • (C) filectime()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (B) fileatime()

Q. Which PHP function is capable to read specific number of characters from a file?

  • (A) filegets()
  • (B) fget()
  • (C) fgets()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) fgets()

Q. Which PHP function is used to find the position of the last occurrence of a substring inside another string?

  • (A) strops()
  • (B) strrpos()
  • (C) strtr()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (B) strrpos()

Q. Which of the following function in PHP returns the time of sunrise of a particular day and location?

  • (A) date_sunrise()
  • (B) date-sunrise()
  • (C) sunrise()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) date_sunrise()

Q. Which PHP function converts an English text datetime into a Unix timestamp?

  • (A) str_to_time()
  • (B) strtodate()
  • (C) strtotime()
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) strtotime()