- var_dump: documentation ( source)
- filter_var: documentation ( source)
<?php
$urls = [
'https://heartbeat.gmbh',
'https://google.com/öäü',
'https://luya.io',
];
foreach ($urls as $u) {
$r = filter_var($u, FILTER_VALIDATE_URL);
var_dump($r);
}