I usually use the English documentation of PHP, as it seems to me that it is always updated, but when I access the documentation of file_get_contents
in Portuguese, I noticed the following messages:
string file_get_contents ( string $filename [, int $flags [, resource $context [, int $offset [, int $maxlen ]]]] )
flags
:
Warning
For all versions prior to PHP 6, this parameter is called use_include_path and is a bool. The flags parameter is available only from PHP 6. If you are using an earlier version and want to fetch the filename file from the include_path, this parameter should be TRUE. From PHP 6, you should use the FILE_USE_INCLUDE_PATH flag.
Changelog
- 5.0.0 Added context support.
- 5.1.0 Added parameters
offset
andmaxlen
. - 6.0.0 The
use_include_path
parameter was replaced with theflags
parameter.
But in the English documentation it looks like this:
Note:
As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be used to trigger include path search.
That is, it seems to me that the information in Portuguese says that the $flags
parameter is from version 6 and in English documentation the $flags
parameter has been used since version 5.
Is this an error in the documentation in Portuguese? I used FILE_USE_INCLUDE_PATH
and it worked perfectly with PHP5, this makes me think that documentation in Portuguese is not reliable.