PHP Basics MCQs

11. Which of the below symbol is a newline character?

A. \r
B. \n
C. /r
D. /n

View Answer


12. PHP files can contain ________ code.

A. text
B. HTML
C. python
D. Both A and B

View Answer


13. which of the following is new operator added in PHP 7?

A. <=!
B. <=$
C. <=>
D. <=?

View Answer


14. Which of the conditional statements is/are supported by PHP?
i) if statements
ii) if-else statements
iii) if-elseif statements
iv) switch statements

A. Only i)
B. i), ii) and iv)
C. ii), iii) and iv)
D. i), ii), iii) and iv)

View Answer


15. PHP can create, open, read, write, delete, and close files on the server.

A. True
B. False
C. PHP can only create, open and close files on the server
D. PHP can read, write and delete files on the server

View Answer


16. What will be the output of the following PHP code?

<?php
$x = 8;
$y = 8.0;
echo ($x === $y);
?>

A. 8 === 8
B. No Output
C. 1
D. 0

View Answer


17. The script that executes at the browser side is called _____

A. Client side scripting
B. Server side scripting
C. Both A and B
D. None of the above

View Answer


18. PHP can send and receive cookies?

A. True
B. False
C. PHP older version can not send and receive cookies but new version can.
D. PHP new version can not send and receive cookies but old version can.

View Answer


19. On which Platform PHP Runs?

A. Windows
B. Linux
C. Mac OS X
D. All of the above

View Answer


20. The PHP syntax is most similar to:

A. VBScript
B. JavaScript
C. Perl and C
D. All of the above

View Answer





Discussion


* You must be logged in to add comment.