Function __global->file_get_contents

Definitions

sources_custom/phpstub.php

  • Get the contents of a file.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filename SHORT_TEXT No No required parameter N/A N/A The file name
$use_include_path boolean No No False N/A N/A Whether to search within the include path
$context ?resource No No Null N/A N/A A stream context to attach to (null: no special context)
$offset integer No No 0 N/A N/A Offset
$maxlen ?integer No No Null N/A N/A Maximum length (null: no limit)

Returns

  • The file contents (false: error)
  • Type: ~LONG_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the contents of a file.
 *
 * @param  SHORT_TEXT $filename The file name
 * @param  boolean $use_include_path Whether to search within the include path
 * @param  ?resource $context A stream context to attach to (null: no special context)
 * @param  integer $offset Offset
 * @param  ?integer $maxlen Maximum length (null: no limit)
 * @return ~LONG_TEXT The file contents (false: error)
 */

function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $maxlen = null)