Time remaining
:
:
Test Status
PHPRANDOMTEST
Ques 1 :
Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function ?
(A) phptutor/index.php
(B) /phptutor/index.php
(C) c:/apache/htdocs/phptutor/index.php
(D) index.php
Ques 2 :
When uploading a file if the UPLOAD_ERR-OK contains value 0 it means.
(A) Uploaded file size is 0
(B) Uplaod is not successful, error occurred
(C) The file uploaded with success
(D) File upload progress is 0% completed
Ques 3 :
Is it possible to submit a form with out a submit button?
(A) Yes
(B) No
Ques 4 :
Which datatypes are
treated
as arrays ?
(A) Integer
(B) Float
(C) String
(D) Booleans
Ques 5 :
PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.
(A) client side language
(B) local language
(C) global language
(D) loosely typed language
Ques 6 :
The PHP syntax is most similar to
(A) PERL and C
(B) Java script
(C) VB Script
(D) Visual Basic
Ques 7 :
In PHP, during error handling include() generates....................
(A) a fatal error, and the script will stop
(B) a warning, but the script will continue execution
(C) None of the above
Ques 8 :
Which of these statements is true?
(A) PHP interfaces to the MySQL database,and you should transfer any data in Oracle or Sybase to MySQL if you want to use PHP on the data.
(B) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase. A wrapper layer is provided so that code written for one database can easily be transferred to another if you later switch your database engine.
(C) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase but the interface differs in each case.
(D) There's little code in PHP to help you interface to databases, but there's no reason why you can't write such code if you want to.
Ques 9 :
Which of the following delimiting method is known as string Interpolation
(A) delimited by single quote
(B) delimited by double quote
(C) delimited by <<< identifier
(D) All of above
Ques 10 :
All variables in PHP start with which symbol?
(A) !
(B) &
(C) $
(D) %
Ques 11 :
Which of following variable assignment is 'by value' assignment in PHP
(A) $value1= $value?
(B) $value1= & $value?
(C) $value1= & $value?
(D) None
Ques 12 :
To produce the output I love the summer time, Which of the following statement should be used?
a. <?php print("<P>I love the summer time</p>");?>
b. <?php $season = "summer time"; print("<P>I love the $season</p>"); ?>
c. <?php $message = "I love the $season"; echo $message; ?>
(A) a
(B) a and c
(C) a and b
(D) All of the above
Ques 13 :
Which of the following PCRE regular expressions best matches the string php|architect?
(A) \d{3}\|\d{8}
(B) [a-z][a-z][a-z]\|\w{9}
(C) [az]{3}\|[az]{9}
(D) .*
Ques 14 :
Which of following variable assignment is 'by value' assignment in PHP ?
(A) $value1= $value?
(B) $value1= # $value?
(C) $value1= & $value?
(D) None
Ques 15 :
Which of the following delimiter syntax is PHP's default delimiter syntax.
a. <% %>
b. <?php?>
c. <? ?>
d. <script language="php"> </script>
(A) a
(B) b
(C) c
(D) d
Ques 16 :
Study following steps and determine the correct order.
(1) Open a connection to MySql server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close Connection
(A) 1, 5, 4, 2, 1
(B) 1, 4, 2, 3, 5
(C) 4, 1, 2, 3, 5
(D) 4, 1, 3, 2, 5
Ques 17 :
^[A-Za-z].* matches
(A) play it again
(B) I
(C) both (A) and (B)
(D) 123
Ques 18 :
Which of the following functions can be used to convert the binary data stored in a string into its hexadecimal representation?
(A) encode_hex()
(B) pack()
(C) hex2bin()
(D) bin2hex()
Ques 19 :
Identify the invalid identifier
(A) â??some word
(B) size
(C) my-function
(D) This&that
Ques 20 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Submit Answer
Don't Refresh the Page !! ...