Rainrays Profiles
 
English
   Login | Registration | What you Want | Free Ads | Tours & Travel India

Home rainrays profile world Aadhaar Card Online Free Marketing Contact Us Online Free Marketing URL Submission Online Free Marketing Tour n Travel Free Ads with rainrays Products Web Directory Pincode India Web Directory Search India Jobs Herbalife Club Online Fm radio Recipes

 
 
Custom Search
Plan Your Tour
Best Tours India
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 Religious Tours International Tours
 Religious Tours Indian Tours for Overseas




North East Tour

More Topics...
  Hospitals & clinics in India Hospitals & clinics in India
  Hospitals & clinics in India World Travel Tips
 Kitchen Dictionary Kitchen Dictionary
 Recipes Recipes
 Personality Personality
 Institute/Colleges Institute/Colleges
 Indian Festivals Indian Festivals
 University University
 Restaurant Restaurant
 Districts List in India Districts List in India
 Districts Profile of India Districts Profile of India
 Hotels Hotels
 BSNL STD Codes (INDIA) BSNL STD Codes (INDIA)
 Love dating and Romance Love dating and Romance
 Baby name list Baby name list
 Jobs by location Jobs by location
 Jobs by Keyword Jobs by Keyword
 Jobs by Function Jobs by Function
 Jobs Part Time Jobs Part Time
 Shayari Shayari
 Place Profile Place Profile
 Business Profiles Business Profiles
 Professional Profiles Professional Profiles
 Rainrays Member Rainrays Member
 

Php Interview Question list 1

  Topic » Language » PHP » PHP Interview Question
Post By : Pankaj Raghuwanshi At 2010-12-16

Q. What’s the difference between include and require?
ANSWER: It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
 
 
Q. What does a special set of tags do in PHP?
ANSWER: The output is displayed directly to the browser.
 
Q. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example? ANSWER: In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
 
Q. How do you define a constant?
ANSWER: Via define() directive, like define ("MYCONSTANT", 100);
 
Q. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
ANSWER: PHP Interpreter treats numbers beginning with 0 as octal. 
 
Q. How do you pass a variable by value?
ANSWER:
Just like in C++, put an ampersand in front of it, like $a = &$b
 
Q. When are you supposed to use endif to end the conditional statement?
ANSWER:
When the original if was followed by : and then the code block without braces.
 
Q. Explain the ternary conditional operator in PHP?
ANSWER:
Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
 
Q. How do I find out the number of parameters passed into function?
ANSWER:
func_num_args() function returns the number of parameters passed in.
 
Q. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
ANSWER:
100, it’s a reference to existing variable.
 
Q. What’s the difference between accessing a class method via -> and via ::?
ANSWER:
:: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
 
Q. Will comparison of string "10" and integer 11 work in PHP?
ANSWER:
Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
 
Q. Are objects passed by value or by reference?
ANSWER:
Every thing is passed by value.
 
Q. How do you call a constructor for a parent class?
ANSWER: parent::constructor($value)
 
Q. What’s the special meaning of __sleep and __wakeup?
ANSWER: __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
 

 





Refer to Friend

  Rainryas information World
 
 

Share Info/View About Profile Or Any Comment

 
Your Name:* 
 
Comment:*  
 
 
 
Other Topic
Mehrangarh Fort Jodhpur
Noida :: MGM's College of Engineering Technology
List of Hospitals and Clinics in Madikeri
Stuffed Aloo Naan Recipe
School/ College in Umaria
 
Create Your Profile in Category » PHP Interview Question
 
More on rainrays.com
Top Links : FM Radio | Contact us | About us | Privacy & Policy | Terms & Condition | Extract Email | Submit URL to Search Engine
Net Search : For Cooking | Word Dictionary | Encyclopedia Search | Find Location by MAP | Find a Person | Find Your Shipping | Stock Market | Language Converter
Jobs : Jobs by Location | Part Time Jobs | Jobs by Function | Jobs by Keyword | Jobs Out of india | Jobs Search Engine
Other Links
    Girl baby Names | Boy baby Names | Love dating and Romance | University | Restaurants in India | Hotels in India | Hospitals & clinic
    Coaching Institute | Educational Institution | School/Colleges by Loaction | Recipes | Std Code | PHP | Products | Links
PHP Interview Question

Copyright © 2010 --- All Rights Reserved