Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

PHP MCQs

Basics

  1. What does PHP stand for?

    • a) Personal Home Page
    • b) PHP: Hypertext Preprocessor
    • c) Private Hosting Protocol
  2. How do you echo text in PHP?

    • a) print("text")
    • b) echo "text";
    • c) write("text")
  3. Which symbol starts a variable in PHP?

    • a) @
    • b) $
    • c) &

Functions & Arrays

  1. Which function returns the length of a string?

    • a) strlen()
    • b) strlength()
    • c) len()
  2. How do you add an element to an array?

    • a) array_push()
    • b) array_add()
    • c) array_append()