php mcq questions with answers


                                
You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your site layoutWhich function do you apply to the text, when displaying it? (Choose 2)
A.strip_tags()
B.htmlentities()
C.htmltidy()
D.htmlspecialchars()
E.showhtml()
                                
You want to run the following PHP 4 code with PHP 5In the following example, which access modifier in PHP 5 is equivalent to "var"? class Test { var $tester; }
A.protected
B.invisible
C.public
D.private
E.outofscope
                                
Which of the following code snippets is correct? (Choose 2) a) interface Drawable { abstract function draw(); } b) interface Point { function getX(); function getY(); } c) interface Line extends Point { function getX2(); function getY2(); } d) interface Circle implements Point { function getRadius(); }
A.a)
B.b)
C.c)
D.d)
                                
Which of the following are valid identifiers (Choose 3):
A.function 4You() { }
B.function _4You() { }
C.function object() { }
D.$1 = "Hello";
E.$_1 = "Hello World";
                                
After executing a SELECT query on a database server,
A.All data is immediately transmitted to PHP
B.All data will be transmitted on-demand to PHP
C.None of the above