PHP MCQ Quiz Hub

Current affairs mcq php

Choose a topic to test your knowledge and improve your PHP skills

PHP Stands for





✅ Correct Answer: 2

PHP is _______ scripting language.





✅ Correct Answer: 1

PHP scripts are executed on _________





✅ Correct Answer: 2

PHP Scripts starts with ________





✅ Correct Answer: 2

Which of the following statements prints in PHP?





✅ Correct Answer: 3

In PHP, each statement must be end with ______





✅ Correct Answer: 2

In PHP Language variables name starts with _____





✅ Correct Answer: 4

In PHP Language variables are case sensitive





✅ Correct Answer: 1

In PHP a variable needs to be declare before assign





✅ Correct Answer: 2

Which of the following is not the scope of Variable in PHP?





✅ Correct Answer: 4

What is the use of strlen( ) function in PHP?





✅ Correct Answer: 3

Which of the following is the Concatenation Operator in PHP?





✅ Correct Answer: 2

Which of the following is not PHP Loops?





✅ Correct Answer: 4

What is the use of strpos( ) function in PHP?





✅ Correct Answer: 2

Where setcookie( ) function must appear in PHP?





✅ Correct Answer: 3

What does the hash (#) sign mean in PHP?





✅ Correct Answer: 2

How to define a variable in PHP?





✅ Correct Answer: 4

The uses of strcmp( ) function in PHP?





✅ Correct Answer: 1

What will be the result of combining a string with another data type in PHP?





✅ Correct Answer: 2

Data for a cookie stored in _________ in PHP?





✅ Correct Answer: 4

PHP is a ______ typed language.





✅ Correct Answer: 2

What does fopen() function do in PHP?





✅ Correct Answer: 1

Where session_start() function must appear in PHP?





✅ Correct Answer: 4

What does the PHP Interpreter do?





✅ Correct Answer: 3

Which of the following is used to add comments in PHP?





✅ Correct Answer: 4

What does sprintf() function do in PHP?





✅ Correct Answer: 1

Which function displays the information about PHP?





✅ Correct Answer: 3

What does isset() function do in PHP?





✅ Correct Answer: 2

How PHP files can be accessed?





✅ Correct Answer: 2

A script is a





✅ Correct Answer: 1

When compared to the compiled program, scripts run





✅ Correct Answer: 2

PHP is a widely used ... scripting language that is especially suited for web development and can be embedded into html





✅ Correct Answer: 1

Which of the following is not true?





✅ Correct Answer: 4

Which of the following variables is not a predefined variable?





✅ Correct Answer: 2

You can define a constant by using the define() function. Once a constant is defined





✅ Correct Answer: 1

Which of the following function returns the number of characters in a string variable?





✅ Correct Answer: 4

When you need to obtain the ASCII value of a character which of the following function you apply in PHP?





✅ Correct Answer: 3

A variable $word is set to HELLO WORLD, which of the following script returns in title case?





✅ Correct Answer: 2

The difference between include() and require()





✅ Correct Answer: 1

When a file is included the code it contains, behave for variable scope of the line on which the include occurs





✅ Correct Answer: 1

Which of the following method sends input to a script via a URL?





✅ Correct Answer: 1

Which of the following method is suitable when you need to send larger form submissions?





✅ Correct Answer: 2

Which of the following mode of fopen() function opens a file only for writing. If a file with that name does not exist, attempts to create anew file. If the file exist, place the file pointer at the end of the file after all other data.





✅ Correct Answer: 3

The function setcookie( ) is used to





✅ Correct Answer: 3

To work with remote files in PHP you need to enable





✅ Correct Answer: 1

fopen($file_doc,r+&rdquo opens a file for





✅ Correct Answer: 4

In mail($param2, $param2, $param3, $param4), the $param2 contains:





✅ Correct Answer: 4

mysql_connect( ) does not take following parameter





✅ Correct Answer: 4

Which of the following is not a session function?





✅ Correct Answer: 4

When uploading a file if the UPLOAD_ERR-OK contains value 0 it means





✅ Correct Answer: 2