Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are the differences between include() and include_once
() functions?

Answers were Sorted based on User's Feedback



What are the differences between include() and include_once () functions?..

Answer / anjali ashok arote

include()function is more time consuming because of redeclaration is more in include() file ...
where as include_once()function only declare one time...
in include()function refreshment of file is needed many time
but in include_once()function refreshment of page is only one time

Is This Answer Correct ?    0 Yes 0 No

What are the differences between include() and include_once () functions?..

Answer / nishit

file1.php:
function check()
{
echo 'hello nishit';
}
file2.php
include('file1.php');
check();

file3.php
include('file1.php');[this is worn we should use here
include once.]
include('file2.php');
check();

while execute file3.php see what the error:

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More PHP Interview Questions

What is sorting php?

0 Answers  


What is sticky form in php?

0 Answers  


What are getters and setters php?

0 Answers  


What are the ways we can destroy a session variable ?

3 Answers  


What is php dependency injection?

0 Answers  


How can we submit from without a submit button?

0 Answers  


What is local variable in php?

0 Answers  


What is the meaning of symbol '$' in jquery?

0 Answers  


What are constructor and destructor in PHP?

0 Answers  


What are the new features in php 7?

0 Answers  


How to call javascript function in php on button click?

0 Answers  


Why shouldn't I use mysql_* functions in php?

0 Answers  


Categories