Question Bank

1899 approved questions from the community

What does the strip_tags() function do in PHP?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

Which command-line option allows you to run a single PHP command without a script file?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

Which of the following are benefits of the standard PHP tag '<?php ... ?>'? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
PHP
by Mohamed

Which of the following are valid cookie parameters in PHP? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
PHP
by Mohamed

Which of the following are valid ways to redirect output when running PHP from the command line? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
PHP
by Mohamed

Which of the following are valid PHP error types? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
PHP
by Mohamed

Which of the following are stages in the PHP request lifecycle? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
PHP
by Mohamed

Which of the following are core functions of PHP? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
PHP
by Mohamed

Which of the following are valid PHP variable scopes? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
PHP
by Mohamed

Which of the following are compound data types in PHP? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
PHP
by Mohamed

Which command-line option allows you to specify a custom configuration file for PHP?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

On Windows systems, you typically need to use php-cgi.exe to run PHP scripts from the command line.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

The E_RECOVERABLE_ERROR type indicates major issues that still allow script execution to continue.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

PHP scripts execute from bottom to top unless there's a redirect, error, or exit.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

Constants in PHP have global scope and can be accessed from any part of the code.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

What is the primary engine that powers PHP execution?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

The HttpOnly parameter when set to true makes a cookie accessible through both HTTP protocols and JavaScript.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

PHP 8 introduced union types that allow specifying multiple possible return types separated by vertical bars.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

Setting a location header with header() in PHP will automatically halt script execution.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

PHP is a purely object-oriented programming language.

MEDIUM
TRUE FALSE
20s
PHP
by Mohamed
PreviousPage 28 of 95Next