Skip to content
docsv0.44.3

EditPairs

Apply exact replacements to supplied bytes; this grants no authority and writes no files.

EditPairs::apply()

public static function apply(string $content, array $edits, string $sourceLabel = 'CURRENT file'): array

Transform only the supplied bytes, refusing missing or ambiguous matches.

Parameters

Parameters of apply()
NameTypeDescription
$contentstring
$editsarray<array-key, mixed>
$sourceLabelstring