Question Bank

3705 approved questions from the community

PHP constants can only store string values.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

PHP constants are case-sensitive by default.

EASY
TRUE FALSE
20s
PHP
by Mohamed

PHP settings can be modified at runtime using the ini_set() function.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

What expression did PHP 8 introduce as a more precise alternative to switch statements?

HARD
SINGLE CHOICE
35s
PHP
by Mohamed

What new feature did PHP 8 introduce for function parameters?

HARD
SINGLE CHOICE
35s
PHP
by Mohamed

What is the spaceship operator in PHP 7/8?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

What is the null coalescing operator introduced in PHP 7?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

The iterable type hint was introduced in PHP 7.1 for any data type that can be looped via foreach.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

Variables defined within a function in PHP are accessible outside that function by default.

EASY
TRUE FALSE
25s
PHP
by Mohamed

PHP short tags '<? ... ?>' are always enabled and recommended for use.

EASY
TRUE FALSE
25s
PHP
by Mohamed

Anonymous classes were not supported in PHP 5.

EASY
TRUE FALSE
20s
PHP
by Mohamed

PHP 7/8 supports scalar type declarations with strict typing mode.

MEDIUM
TRUE FALSE
25s
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

What is the third parameter of the define() function used for?

HARD
SINGLE CHOICE
35s
PHP
by Mohamed

What command-line option displays the PHP version?

EASY
SINGLE CHOICE
25s
PHP
by Mohamed

What command-line option displays PHP configuration information?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

What should be done immediately after setting a location header to ensure script execution stops?

HARD
SINGLE CHOICE
35s
PHP
by Mohamed

Which function can be used to configure session cookie parameters for security?

MEDIUM
SINGLE CHOICE
30s
PHP
by Mohamed

Which PHP function should be used for strict email validation with Unicode support?

HARD
SINGLE CHOICE
40s
PHP
by Mohamed

What setting controls the maximum lifetime of a session in PHP?

HARD
SINGLE CHOICE
35s
PHP
by Mohamed
PreviousPage 55 of 186Next