PHP - IT & Programming

Practice questions to test your knowledge and improve your understanding.

0
Answered
0
Correct
0%
Accuracy
Question 1 Medium Mcq

Which PHP variable name is invalid?

Question 2 Medium Mcq

Which of the following are valid PHP data types?

Question 3 Medium Mcq

Which of the following type cast is not correct?

Question 4 Medium Mcq

What will be the output of following code:-

Question 5 Medium Mcq

Which of the following functions is not related to garbage collection in PHP?

Question 6 Medium Mcq

What function computes the difference of arrays?

Question 7 Medium Mcq

What would be the output of the following code? $parts = parse_url("https://example.com/test/1234?testing&val&id=1&&=23&row=4"); parse_str($parts['query'], $query); echo count($query);

Question 8 Easy Mcq

What is the difference between the include() and require() language constructs?

Question 9 Easy Mcq

What is the output of the following code?

Question 10 Medium Mcq

What will it output?

Question 11 Medium Mcq

What does the return code E_ERROR indicate?

Question 12 Medium Mcq

Why is PHP more widely used than ASP?

Question 13 Medium Mcq

How to call a method from within a class?

Question 14 Medium Mcq

Which PHP function returns "true" if a value already exists in an array?

Question 15 Hard Mcq

Which function can you use in error handling to stop the execution of a script and is equivalent to exit()?

Question 16 Medium Mcq

How do single quotes interpret strings in PHP?

Question 17 Medium Mcq

Which construct is typically used for exception handling in PHP?

Question 18 Medium Mcq

The concatenation operator in PHP is

Question 19 Medium Mcq

Which of the following will detect which request type was used (GET, POST, PUT or DELETE)?

Question 20 Medium Mcq

Which datatypes are treated as arrays in some cases?

Question 21 Medium Mcq

Which of the following function libraries are supported in PHP?

Question 22 Medium Mcq

What does the following PHP statement create? define("FIRST-NAME","John");

Question 23 Medium Mcq

Without introducing a non-class member variable, which of the following can be used to keep an eye on the existing number of objects of a given class?

Question 24 Medium Mcq

Which PHP function checks to see if HTTP headers have been sent?

Question 25 Easy Mcq

What is the job of the controller as a component in MVC?

Question 26 Medium Mcq

Is there a function to listen on E_ERROR (fatal) errors?

Question 27 Medium Mcq

Which of these does not represent a single, valid PHP variable

Question 28 Medium Mcq

Which result will produce this code? class A { private $property = 1; public function getProperty() { return $this->property; } } class B extends A { protected $property = 2; public function __construct($v) { $this->property = $v; } } class C extends B { public $property = 3; } $c = new C(4); echo $c->property; echo $c->getProperty();

Question 29 Medium Mcq

The ** operator is useful for sorting operations. It compares two values and returns an integer less than, equal to, or greater than 0 depending on whether the value on the ** is less than, equal to, or greater than the other.

Question 30 Medium Mcq

Which function is used to perform a regular expression match in PHP?

Question 31 Medium Mcq

Which of the following is not a PHP magic constant?

Question 32 Medium Mcq

Placing the ____ symbol before a function tells PHP to suppress any errors generated by that function.

Question 33 Medium Mcq

Which method is used to capture the whole screen in PHP?

Question 34 Medium Mcq

Which function allows you to delete a file?

Question 35 Medium Mcq

Which of the following code snippet is True for Convert JSON string to Object?

Question 36 Medium Mcq

Which of the following is not a valid PHP variable type conversion?

Question 37 Hard Mcq

Which of the following is the correct way to check if a session has already been started?

Question 38 Medium Mcq

Which of the following modifiers are allowed for methods in an Interface? (choose all that apply)

Question 39 Medium Mcq

A _________ is a way to store information (in variables ) to be used across multiple pages.

Question 40 Easy Mcq

What is meant by nl2br()?

Question 41 Hard Mcq

Which of the following are valid MySQLi Configuration Options? (choose all that apply)

Question 42 Medium Mcq

class A{} class_alias( 'A', 'B' ); var_dump(new B); outputs ...

Question 43 Medium Mcq

Which one removes a cookie from client's browser?

Question 44 Easy Mcq

What is the best way to load a file that contains necessary functions and classes?

Question 45 Easy Mcq

What is a key difference between GET and POST?

Question 46 Easy Mcq

What is the default maximum execution time for a PHP script?

Question 47 Medium Mcq

How do I typecast a variable to boolean?

Question 48 Easy Mcq

What is the output of this line of code?"; echo is_finite(log(0)) . ""; echo is_finite(2000); ?>

Question 49 Medium Mcq

dirname(__FILE__) will return what?

Question 50 Medium Mcq

Which statement returns the number of characters in the string variable $a?

Showing 50 of 926 questions