Function __global->cms_parse_ini_file_fast

Definitions

sources/files.php

  • Parse the specified INI file, and get an array of what it found.Designed to be higher performance than PHP's parse_ini_file, for simpler files.Supports locking and character set conversion (using BOMs).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$path ?PATH No No required parameter N/A N/A The path to the ini file to open (null: given contents in $file instead)
$contents ?string No No Null N/A N/A The contents of the file (null: the file needs opening)

Returns

  • A map of the contents of the ini files
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Parse the specified INI file, and get an array of what it found.Designed to be higher performance than PHP's parse_ini_file, for simpler files.Supports locking and character set conversion (using BOMs).
 *
 * @param  ?PATH $path The path to the ini file to open (null: given contents in $file instead)
 * @param  ?string $contents The contents of the file (null: the file needs opening)
 * @return array A map of the contents of the ini files
 */

function cms_parse_ini_file_fast(?string $path, ?string $contents = null) : array