Created
May 25, 2020 18:53
-
-
Save dunglas/5b10b586427cf66e78a968f82f80691a to your computer and use it in GitHub Desktop.
URI Template test in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Rize\UriTemplate; | |
$uri = new UriTemplate('', ['version' => 1.1]); | |
var_dump($uri->extract('https://example.net/{ip}', 'https://example.net/2001:db8::35')); | |
var_dump($uri->extract('https://example.net/{ip}', 'https://example.net/2001:db8::35', true)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment