Home >> PHP >> What is difference between include_once and require_once in PHP

What is difference between include_once and require_once in PHP

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

2- include_once() - E_WARNING but require_once()- E_COMPILE_ERROR

Post Your Comment

Next Questions
What is difference between include and require
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
Operators
Arithmatic operators
Assignment operators
Increment / Decrement Operators
Comparision Operators
Logical operators
Array Operators
String

Copyright ©2022 coderraj.com. All Rights Reserved.