- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$proxy = "http://XDGC463:LaposteAphelion!@surf-sccc.pasi.log.intra.laposte.fr:8080";
$regexProxy = '/(?P<scheme>https?):\/\/((?P<username>[^:]+)(:(?P<password>.+))?@)?(?P<url>(?P<host>[a-z0-9\.-]+)(:(?P<port>\d+))?)/';
preg_match($regexProxy, $proxy, $matches);
var_dump($matches);