Online Test for PHP
- What is most appropriate way to open file "placementquestion.txt" in write mode?
openf("placementquestion.txt", "w");fopen("placementquestion.txt", "w");open("placementquestion.txt", "w");fopen("placementquestion.txt", "w+");
- The variable name is case-sensitive in PHP.
TrueFalse
- $this is a reference to the calling object
TrueFalse
- The break statement ends execution of which of the following?
whileforswitchAll of the above
- Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays).
Float, stringEven number, stringString, BooleanInteger, string
- How to typecast a variable to Boolean?
$var = $var == $var;$var = (true)$var;$var = (bool)$var;Variable cannot be typecast in Boolean
- _______ function is used to sort an array in ascending order by value while preserving key associations.
ksort()asort()krsort()usort()
- In which circumstance it is not possible to assign default value to a parameter while declaring a function?
When the parameter is BooleanWhen the function is being declared as a member of a classWhen the parameter is being declared as passed by referenceWhen the function contains only one parameter
- Which of the following tags is not a valid way t o begin and end a PHP code block?
<% %><! !><? ?><?= ?>
- By default, PHP stores session data in ______________.
The filesystemA databaseVirtual memoryShared memory
Also Exercise
Post Your Question
Social Sharing
Facebook
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015