wppaste
WordPress

WP_Filesystem_Direct::get_contents_array( string $file ): array|false

Since
2.5.0
Source
wp-admin/includes/class-wp-filesystem-direct.php:50
Reads entire file into an array.

Parameters

$filestring
Path to the file.

Return

array|false
File contents in an array on success, false on failure.

Source

	public function get_contents_array( $file ) {		return @file( $file );	}

History

Introduced in 2.5.0. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

7.1.0
Return type changed from array|false to string[]|false.verified against source
2.5.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-admin/includes/class-wp-filesystem-direct.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.