I may be mistaken, but choosing the term module is to refer to two situations where the return
can be used, for example I believe that the majority will assume that the return
is used in functions, yes indeed it is correct:
function foo() {
return 1;
}
However the return
is supported in PHP by include
and require
(eventually by the first call of _once
, but this is another story, then I explain).
For example if you do this:
php test.:
<?php
return 'teste';
And call it that:
<?php
$x = include 'teste.php';
var_dump($x);
Will get this:
string(5) "test"
So I guess they chose the module name for this reason, since function
is a thing and include
is another, internally (at the lowest level) may even be "identical", but at the level of PHP are different things, so it is as if it were really 2 modules, a script and another include
.
Vixe, documentation in Portuguese is very messy... Wait for someone to answer :p
– Wallace Maxters
@Wallacemaxters the documentation in English is the same.
– Maniero
What are modules in programming?
– rray