The operating mechanism of PHP include and require is What?

  ios, question

In the process of learning Zend, I saw such code:

$config = new Zend_Config(require 'config.php');

He also made some attempts:
var_dump(require ‘test.php’)
1. If there is no return statement, the output is:

int(1)

2. If return statement, enter the data as return:

...

May I ask that PHP’s require and include mechanisms are What?
PS: Although I downloaded the source code of PHP, I couldn’t find a clue at the moment.

Update
A Test for test.php output.php

// output.php
output(require 'test.php');
// or output(include 'test.php');
function output($test) {
    var_dump($test);
}

Case 1

// test.php 1
return 123;
// output 1
int(123)

Case 2

// test.php 2
echo 123;
// output 2
123int(1)

Case 3

// test.php 3
echo 123;
die;
// output 3
123

According to the official php explanation, the difference between require and include is that require will throw a fatal error when it encounters an error, while include will only throw warning.

require() is identical to include() except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include() only emits a warning (E_WARNING) which allows the script to continue.
See the include() documentation for how this works.

Their principle is: parse the included file according to HTML, and then replace the position of the include statement with the output.

Here is an article by Laruence for reference.http://www.laruence.com/2010/05/04/14 …