- 15th Nov, 2022
- 794 Followers
Latest MCQ Tests
Pratice HR Questions
1) What PHP stands for?
2) How does the identity operator === compare two values?
3) Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
4) Variables always start with a ........ in PHP
5) PHP is an open source software
6) Which of the following is not valid PHP code?
7) What is the difference between print() and echo()?
8) PHP runs on different platforms (Windows, Linux, Unix, etc.)
9) Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well.
10) Which array function checks if the specified key exists in the array
11) There are three different kind of arrays:
12) Absent any actual need for choosing one method over the other, does passing arrays by value to a read-only function reduce performance compared to passing them by reference?
13) Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?
14) What function computes the difference of arrays?
15) What functions count elements in an array?
16) What array will you get if you convert an object to an array?
17) PHP sessions are created using the . . . . . function
18) When you want to store user data in a session use the . . . . array
19) Sessions allow you to
20) A snapshot of the session data can be taken at any time and written out to a file
21) When the session data is written to a file, it can be read back, decoded and applied to the current session using the . . . . function
22) session_destroy() instantly destroy elements of the $_SESSION array
23) Appending session data to an absolute URL does not represent a security risk
24) If the php.ini register_globals directive is set, session data becomes available in the . . . . namespace
25) No expiry date is set in the cookie that PHP sets for the session. The session remains current only as long as the browser is active. When the browser is restarted the cookie is not stored. This behavior can be changed by altering . . . . . setting in php.ini file
26) session_destroy() erases all session variable
27) In PHP the integer 45 is stored exactly as 45. The floating point number 46.3 could be stored as
28) The static members in traits are linked to whichever . . . . uses them, rather than the trait itself
29) There can be situations where a class uses two traits with the same method and this may cause the code to throw an error. To avoid errors like this, you can use the operator . . . . . .
30) Traits can be further composed of other traits, even supporting the . . . . . . .
Php Online Test Questions (Php FAQs)
1) What is PHP simple definition?