{"id":308,"date":"2018-05-03T01:10:01","date_gmt":"2018-05-02T19:10:01","guid":{"rendered":"https:\/\/mcqacademy.com\/en\/mcq\/whats-the-difference-between-the-include-and-require-functions\/"},"modified":"2018-05-03T01:10:01","modified_gmt":"2018-05-02T19:10:01","slug":"whats-the-difference-between-the-include-and-require-functions","status":"publish","type":"mcq","link":"https:\/\/mcqacademy.com\/en\/mcq\/whats-the-difference-between-the-include-and-require-functions\/","title":{"rendered":"What\u2019s the difference between the include() and require() functions?"},"content":{"rendered":"<p>What\u2019s the difference between the <code>include()<\/code> and <code>require()<\/code> functions?<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","topic":[302],"subject":[34],"class_list":["post-308","mcq","type-mcq","status-publish","hentry","topic-php-functions","subject-php-programming"],"mcq_note":"Both the functions\u00a0<code>require()<\/code> and <code>include()<\/code> include a specific file but on <code>require()<\/code>\u00a0function\u00a0the process exits with a fatal error if the file can't be included, while the\u00a0<code>include()<\/code> statement may still pass and jump to the next step in the execution.","mcq_options":[{"right":"yes","answer":"<code>require()<\/code>\u00a0function exits with a fatal error if the file can't be included, while the\u00a0<code>include()<\/code> function may still pass and jump to the next step in the execution."},{"right":"no","answer":"<code>include()<\/code>\u00a0function exits with a fatal error if the file can't be included, while the\u00a0<code>require()<\/code> function may still pass and jump to the next step in the execution."},{"right":"no","answer":"No difference, <code>require()<\/code> function is just an alias of <code>include()<\/code>\u00a0function."},{"right":"no","answer":"<code>require()<\/code> function is depricated on PHP 7.x while <code>include()<\/code>\u00a0function is recommended."}],"multi_answers":"no","subject_terms":[{"id":34,"title":"PHP Programming","slug":"php-programming"}],"topic_terms":[{"id":302,"title":"PHP Functions","slug":"php-functions"}],"_links":{"self":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq\/308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq"}],"about":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/types\/mcq"}],"author":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/comments?post=308"}],"wp:attachment":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/topic?post=308"},{"taxonomy":"subject","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/subject?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}