urldecode

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Decodes URL-encoded string
<?php urldecode(string $string): string
<?php {

    public function __invoke($component)

    {

        $class = urldecode($component);



        return app()->call(app('livewire')->new($class));

    }
<?php             Route::get('livewire-dusk/{component}', function ($component) {

                $class = urldecode($component);



                return app()->call(app('livewire')->new($class));

            })->middleware(['web', AllowListedMiddleware::class, BlockListedMiddleware::class]);
<?php             })->middleware('web');



            Route::get('/with-authentication/livewire-dusk/{component}', function ($component) {

                $class = urldecode($component);



                return app()->call(app('livewire')->new($class));

            })->middleware(['web', 'auth']);
<?php             Gate::policy(Post::class, PostPolicy::class);



            Route::get('/with-authorization/{post}/livewire-dusk/{component}', function (Post $post, $component) {

                $class = urldecode($component);



                return app()->call(new $class);

            })->middleware(['web', 'auth', 'can:update,post']);
<?php $publicPath = getcwd();



$uri = urldecode(

    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''

);
<?php         $this->assertSame('http://www.foo.com/foo/bar?baz=boom', $url->query('foo/bar?baz=boom', ['nonexist' => null]));

        $this->assertSame('http://www.foo.com/foo/bar', $url->query('foo/bar?baz=boom', ['baz' => null]));

        $this->assertSame('https://www.foo.com/foo/bar/baz?foo=bar&zal=bee', $url->query('foo/bar?foo=bar', ['zal' => 'bee'], ['baz'], true));

        $this->assertSame('http://www.foo.com/foo/bar?baz[0]=boom&baz[1]=bam&baz[2]=bim', urldecode($url->query('foo/bar', ['baz' => ['boom', 'bam', 'bim']])));

    }



    public function testAssetGeneration()
<?php             '#' => '-',

        ];



        $str = Stringy::create(urldecode($string))->toAscii();



        foreach ($replacements as $from => $to) {

            $str = $str->replace($from, $to);
<?php     public function urldecode($value)

    {

        return urldecode($value);

    }
<?php $uri = urldecode(

    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)

);
<?php         $cookies = [];

        foreach ($cookieParts as $cookiePart) {

            [$cookieName, $cookieValue] = explode('=', $cookiePart, 2);

            $cookies[$cookieName] = urldecode($cookieValue);

        }

        return $cookies;

    }