<?php
$domains = array(
'http://wwwvagrant.royalmail.com/business',
'http://wwwvagrant.parcelforce.com',
'https://www2.postoffice.co.uk',
'http://wwwvagrant.royalmail.com',
'asdfasdfasdf',
'http://eibvagrant.royalmail.com',
'http://wwwvagrant.royalmail.com/payments',
);
$doamins = array_filter($domains, function($domain) { return filter_var($domain, FILTER_VALIDATE_URL) !== FALSE; });
print_r($domains);
var_dump( filter_var('dsd', FILTER_VALIDATE_UR))
- Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
- Parse error: syntax error, unexpected end of file in /in/2Gplr on line 14
Process exited with code 255.
preferences:
172.75 ms | 1395 KiB | 28 Q