Question Bank
3705 approved questions from the community
PHP constants can only store string values.
PHP constants are case-sensitive by default.
PHP settings can be modified at runtime using the ini_set() function.
What expression did PHP 8 introduce as a more precise alternative to switch statements?
What new feature did PHP 8 introduce for function parameters?
What is the spaceship operator in PHP 7/8?
What is the null coalescing operator introduced in PHP 7?
The iterable type hint was introduced in PHP 7.1 for any data type that can be looped via foreach.
Variables defined within a function in PHP are accessible outside that function by default.
PHP short tags '<? ... ?>' are always enabled and recommended for use.
Anonymous classes were not supported in PHP 5.
PHP 7/8 supports scalar type declarations with strict typing mode.
Which command-line option allows you to run a single PHP command without a script file?
What is the third parameter of the define() function used for?
What command-line option displays the PHP version?
What command-line option displays PHP configuration information?
What should be done immediately after setting a location header to ensure script execution stops?
Which function can be used to configure session cookie parameters for security?
Which PHP function should be used for strict email validation with Unicode support?
What setting controls the maximum lifetime of a session in PHP?