Returns an array of lines from a file, class, or arbitrary string, where $data is the data
to read the lines from and $lines is an array of line numbers specifying which lines should
be read.
public static lines ( string $data, array $lines ) : array | ||
$data | string | If `$data` contains newlines, it will be read from directly, and have its own lines returned. If `$data` is a physical file path, that file will be read and have its lines returned. If `$data` is a class name, it will be converted into a physical file path and read. |
$lines | array | The array of lines to read. If a given line is not present in the data, it will be silently ignored. |
return | array | Returns an array where the keys are matching `$lines`, and the values are the corresponding line numbers in `$data`. |