<?php
//nova data 08/06/2022
$data = '2022-06-08';
$regex = '/(\d{4})-(\d{2})-(\d{2})/';
$dataCap = preg_match(
$regex,
$data,
);
$dataTransformada = preg_replace(
$regex,
'\3/\2/\1',
$data
);
echo $dataTransformada;