0 votes
123 views
in PHP by (98.9k points)
edited

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

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
require(), and require_once() perform the same task except that the second function checks if the PHP script is already included or not before executing it.

(same for include_once() and include())

Related questions

0 votes
1 answer 104 views
asked Apr 9, 2022 in PHP by Doubtly (98.9k points)
0 votes
1 answer 96 views
asked Oct 9, 2022 in PHP by MrRam (2.0k points)
0 votes
1 answer 139 views
0 votes
1 answer 121 views
asked Oct 1, 2022 in Tailwind by Doubtly (98.9k points)
0 votes
1 answer 100 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

537 users

...