3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dsn = 'git+http://github.com/phpDocumentor/phpDocumentor2;branch=develop'; $dsnParts = implode(';', $dsn); $location = $dsnParts[0]; unset($dsnParts[0]); $locationParts = parse_url($location); $options = array(); foreach($dsnParts as $part) { $option = explode('=', $part); $options[$option[0]] = $option[1]; } var_dump($locationParts); var_dump($options);

preferences:
59.88 ms | 402 KiB | 5 Q