Home >> PHP >> What is difference between include and require in PHP

What is difference between include and require in PHP

1-Both are similar but file is not found by include(), a warning error will be issued, but execution will continue and require() it will cause a fatel error and halt the execution of the script.

2- include() - E_WARNING but require()- E_COMPILE_ERROR

Post Your Comment

Next Questions
What is meant by urlencode and urldecode
How To Get the Uploaded File Information
Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars
How do you pass a variable by value
How do I find out the number of parameters passed into function
How To Protect Special Characters in Query String
What is the difference between GET and POST
What are the different types of errors
If conditional statement
If else conditional statement
If else / else if conditional statement
Switch conditional statement
For loop
While loop
Do while loop
Foreach loop
Arithmatic operators
Assignment operators
Increment / Decrement Operators
Comparision Operators
Logical operators
Array Operators
addcslashes() function

Copyright ©2022 coderraj.com. All Rights Reserved.