srph/qp

This package is abandoned and no longer maintained. No replacement package was suggested.

A library to parse or stringify query parameters in PHP.

Maintainers

Details

github.com/srph/qp

Source

v0.1.0 2015-12-12 06:34 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:53:39 UTC


README

A library to parse or stringify query parameters in PHP.

Deprecation Notice

Use http_build_query instead. This library doesn't have a valid use case.

Installing

composer require srph/qp

Supports versions >=5.5.9 (including 7.0).

Usage

use Qp\Qp;
Qp::parse('username=kier'); // ['username' => 'kier']
Qp::parse('user[name]=kier'); // ['user' => ['name' => 'kier']];
Qp::parse('users[]=kier'); // ['users' => ['kier']]
Qp::stringify(['username' => 'kier', 'password' => '****']); // 'username=kier&password=*****'

Limitations

I'm short in time at the moment, and I don't see their usage in real world application yet. But if you would like them to be supported (which I would consider rare), feel free to submit a pull request.