Honeywell Previous Years Solved Sample Placement Papers
- Which of the following variable names are invalid?
A. $var_1
B. $var1
C. $var-1
D. $var/1
E. Both c,d
- What will be the output of the following code?
$a = 10; echo ‘Value of a = $a’;
A. Value of a = 10
B. Value of a = $a
C. Undefined
D. Syntax Error
- What will be the output of the following code?
$Rent = 250; function Expenses($Other) { $Rent = 250 + $Other; return $Rent; } Expenses(50); echo $Rent;
A. 300
B. 250
C. 200
D. Program will not compile
- The following PHP variables are declared:
$company = ‘ABS Ltd’; $$company = ‘,Sydney’;
Which of the following is not a correct way of printing ‘ABS Ltd,Sydney’?
A. echo ‘$company $$company’;
B. echo ‘$company ${$company}’;
C. echo ‘$company ${‘ABS Ltd’}’;
D. echo ‘$company {$$company}’;
- Which of the following is not supported in PHP5?
A. Type Hinting
B. Reflection
C. Magic Methods
D. Multiple Inheritance
- Which of the following is correct with regard to echo and print?
A. echo is a construct and print is a function
B. echo is a function and print is a construct
C. Both are functions
D. Both are constructs
- What will be the output of the following code?
$a = 10; echo ‘Value of a = $a’;
A. Value of a = 10
B. Value of a = $a
C. Undefined
D. Syntax Error
- Which of the following is a PHP resource?
A. Domxml document
B. Odbc link
C. File
D. All of the above
- In multidimensional arrays rather than a single key, values are stored in:
A. Sequence of key values
B. 2 keys
C. Linear style
D. None of them
- PHP arrays are also called as:
A. Vector arrays
B. Perl arrays
C. Hashes
D. All of them
- In vector arrays, the elements must have:
A. Same size
B. Same type
C. Different size
D. Different type