- preg_match: documentation ( source)
- rawurldecode: documentation ( source)
<?php
$str = 'https://www.hwtrek.com/project/VscVjE%2FLOxM%3D';
$new_str = 'https://www.hwtrek.com/project/VscVjE%2FLOxM%3D';
do {
$new_str = rawurldecode($new_str);
} while (preg_match('/%[0-9a-f]{2,}/i', $new_str));
echo $new_str, '\n', $str;