Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pjpawel authored Apr 23, 2022
1 parent a3fe3ae commit 7110b04
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@
<?php

use pjpawel\Url;
use pjpawel\Exceptions\ParseException;

$url = "www.malformed.url.com";
$url = "www.malformed_url.com";

try {
$parsedUrl = Url::parse($url);
var_dump($parsedUrl);
} catch (ParseException $e) {
echo "Exception $e->getmessage()";
}
$parsedUrl = Url::parse($url);
var_dump($parsedUrl);
```
Output array is the same as [parse_url()](https://www.php.net/manual/en/function.parse-url.php)

0 comments on commit 7110b04

Please sign in to comment.