Programming - PHP

You Are Here :: Home > Programming > PHP- General Questions

 
31.

Which of the following variable names are invalid??                          


A. $var_1 B. $var1
C. $var-1 D. $var/1




32.

What will be the output of the following code? function fn (&$var) { $var = $var - ($var/10*5); return $var; } echo fn(100);?                          


A. 100 B. 50
C. 98 D. Error message




33.

What will be the output of following code? $a = 10; echo 'Value of a = $a';?                          


A. Value of a = 10 B. Value of a = $a
C. Undefined D. Syntax Error




34.

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




35.

Which of the following variable declarations within a class is invalid in PHP5??                          


A. private $type = 'moderate'; B. internal $term= 3;
C. public $amnt = '500'; D. protected $name = 'Quantas Private Limited';




36.

Which of the following is used to maintain the value of a variable over different pages??                          


A. static B. global
C. session_register D. None of the above




« prev

1

2

3

4

5

6

7

8

9

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on