Technology Questions

Practice Technology MCQs with answers and explanations. Page 65 of 79.

Category
Interview
Topic
Technology
Page
65 / 79
Mode
Practice

Questions

Open any question to view the answer and explanation.

In PHP source code embedded in HTML, what is the purpose of the special PHP opening and closing tags such as <?php and ?>?
Open
View answer
In PHP, you assign a variable the literal value 0123 and it prints as a different decimal number. What is the underlying problem in this situation?
Open
View answer
In PHP, if variable $a equals 5 and variable $b equals the character a, what is the value of the variable variable $$b?
Open
View answer
In PHP object serialization, what is the special meaning of the magic methods __sleep() and __wakeup()?
Open
View answer
In PHP string escape sequences, what is the difference between the sequences \\23 and \\x23 when used inside double quoted strings?
Open
View answer
In PHP, what is the difference between the hash functions md5(), crc32(), and sha1() in terms of output size and typical usage?
Open
View answer
In PHP, what is the main difference between include and require when you bring in an external file?
Open
View answer
In PHP, how do you define a constant value that cannot be changed at runtime?
Open
View answer
In PHP function calls, how do you pass a variable by value rather than by reference?
Open
View answer
In PHP, what does the ternary conditional operator do and how is it used in expressions?
Open
View answer
In modern PHP versions, are objects passed by value or by reference when you assign them to another variable or pass them into a function?
Open
View answer
In PHP object oriented programming, how do you call the constructor of a parent class from within a child class constructor?
Open
View answer
In PHP, should you initialise string literals with single quotes or double quotes, and what practical difference does this choice make?
Open
View answer
In PHP, there are echo, print, and printf for output. How do these constructs differ in behaviour and typical usage?
Open
View answer
In PHP, what is the difference between htmlentities() and htmlspecialchars() when escaping text for HTML output?
Open
View answer
In PHP file handling, what is the standard way to open a file for reading or writing?
Open
View answer
In PHP, why do we use the array_flip() function on an associative array?
Open
View answer
In Apache based PHP hosting, what is a .htaccess file and why is it used?
Open
View answer
In a PHP script index.php, can you include the same file xyz.php twice, and what is the effect?
Open
View answer
In PHP, how can you get information about the client browser such as name and version?
Open
View answer

Practice smarter

Solve a few questions daily and revisit weak topics regularly to improve accuracy.