Skip to content

Commit

Permalink
fix: correcting minor issues in URI usage documentation (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasgreen authored Aug 4, 2024
1 parent 5727746 commit 80028ec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/uri/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ in a similar way a browser would.

### Example

namespace Sabre\Uri;
use Sabre\Uri;

$base = 'http://example.org/foo/bar/';
$new = '../hello'
$new = '../hello';

echo Uri\resolve($base, $new);
// Output: http://example.org/foo/hello
Expand Down Expand Up @@ -53,11 +53,11 @@ For example, these urls all point to the same resource:

### Example

namespace Sabre\Uri;
use Sabre\Uri;

$input = 'HTTP://example.org:80/%7efoo/./bar/';

echo Uri\normalize($output);
echo Uri\normalize($input);
// Output: http://example.org/~foo/bar/


Expand All @@ -71,7 +71,7 @@ even if those parts are not set.

### Example

namespace Sabre\Uri;
use Sabre\Uri;

$input = '/foo/bar';
print_r(
Expand Down Expand Up @@ -112,7 +112,7 @@ The `split` function takes a path and returns the [`basename()`][2] and

### Example

namespace Sabre\Uri;
use Sabre\Uri;

$input = "/path/to/file/";

Expand All @@ -121,7 +121,7 @@ The `split` function takes a path and returns the [`basename()`][2] and
$basename
) = Uri\split($input);

echo $parent; // output : /path/to/
echo $parent; // output : /path/to
echo $basename; // output : file

### Why not basename() and dirname()?
Expand Down

0 comments on commit 80028ec

Please sign in to comment.