What is the main difference between require() and require_once()?



What is the main difference between require() and require_once()?..

Answer / Khalid Husain

"The main difference between require() and require_once() in PHP is that if a file is included multiple times using require(), it will be parsed each time, while require_once() ensures that the file is included only once."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is associative array in php?

1 Answers  


What is the difference between get & post ?

1 Answers  


How to get useful error messages in php?

1 Answers  


How can we encrypt the username and password using PHP?

3 Answers   Rushmore Consultancy,


How to run the interactive php shell from the command line interface?

1 Answers  


Does mysql need php?

1 Answers  


Define urlencode() and urldecode() used in php?

1 Answers  


What is default session time and path in PHP. How to change it?

1 Answers  


How to print \ in php. Only \ with out using . or *.

7 Answers   American Solutions,


Can anybody plz tell me if there any recruitment on php plz mail to vasudev.adepu@gmail.com.i had completed M.SC(MATHS) in 2007 . trying to get a job on php. i have good knowledge on PHP/MYSQL

1 Answers  


How many types of arrays are there in php?

1 Answers  


Tell me how is it possible to parse a configuration file?

1 Answers  


Categories