- var_dump: documentation ( source)
- parse_url: documentation ( source)
- in_array: documentation ( source)
<?php
$value = 'https://oembed.com/providers.json';
$valid = TRUE;
if (in_array(parse_url($value, PHP_URL_SCHEME), [NULL, FALSE], TRUE)) {
$valid = FALSE;
}
var_dump($valid);