preg_replace_with_count

function preg_replace_with_count(
  mixed $pattern,
  mixed $replacement,
  mixed $subject,
  int $limit,
  ?int &$count,
): mixed;

Parameters

  • mixed $pattern
  • mixed $replacement
  • mixed $subject
  • int $limit
  • ?int &$count

Returns

  • mixed