{"id":28452480,"url":"https://github.com/martin-schilling/php-velocypack","last_synced_at":"2025-07-02T04:31:06.943Z","repository":{"id":249561778,"uuid":"132262582","full_name":"martin-schilling/php-velocypack","owner":"martin-schilling","description":"PHP 7.1+ extension wrapping the arangodb/velocypack library","archived":false,"fork":false,"pushed_at":"2019-09-14T10:53:53.000Z","size":74,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T18:11:37.035Z","etag":null,"topics":["extension","json","php","velocypack","vpack"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martin-schilling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-05T15:52:53.000Z","updated_at":"2022-06-20T16:24:03.000Z","dependencies_parsed_at":"2024-07-21T21:37:48.905Z","dependency_job_id":"2cc5f7ae-9130-4ba8-856f-d94a185416f0","html_url":"https://github.com/martin-schilling/php-velocypack","commit_stats":null,"previous_names":["martin-schilling/php-velocypack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martin-schilling/php-velocypack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-schilling%2Fphp-velocypack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-schilling%2Fphp-velocypack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-schilling%2Fphp-velocypack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-schilling%2Fphp-velocypack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martin-schilling","download_url":"https://codeload.github.com/martin-schilling/php-velocypack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-schilling%2Fphp-velocypack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263074388,"owners_count":23409752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","json","php","velocypack","vpack"],"created_at":"2025-06-06T18:11:13.440Z","updated_at":"2025-07-02T04:31:06.907Z","avatar_url":"https://github.com/martin-schilling.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-velocypack\n\n[![Build Status](https://travis-ci.com/martin-schilling/php-velocypack.svg?branch=master)](https://travis-ci.com/martin-schilling/php-velocypack)\n\nThis is still under heavy development but feel free to try the extension and report any bugs you might encounter.\n\nThis extension does not aim to replicate the library interface of the original velocypack [C++ implementation](https://github.com/arangodb/velocypack). It rather wraps the C++ velocypack library to provide a way to easily interact with Velocypack data from inside PHP. For an overview of the classes, interfaces and the functionality they provide take a look at the [PhpStorm Stubs](https://github.com/martin-schilling/php-velocypack/blob/master/phpstorm-stubs/php-vpack.php)\n\n## Installation\n### Initial Setup\n```\n$ git clone https://github.com/martin-schilling/php-velocypack.git\n$ cd php-velocypack\n$ ./clone_velocypack\n$ docker-compose build extension-builder\n```\n### Compile Extension\n```\n$ docker-compose run --rm extension-builder\n$ docker-compose build php \n```\n### Run Tests\n```\n$ docker-compose run --rm php make test\n```\n### Run Script\n```\n$ docker-compose run --rm php php script_name.php\n```\n\n## Usage\n### Creating a Vpack\n```php\n$vpack = \\Velocypack\\Vpack::fromJson('{\"test\":\"abcde\", \"numbers\": [1234, 5678]}');\n$vpack = \\Velocypack\\Vpack::fromArray([\"a\" =\u003e [123], \"b\" =\u003e [\"c\" =\u003e true]]);\n$vpack = \\Velocypack\\Vpack::fromBinary($binaryContent);\n```\n### Accessing the values of a Vpack\n```php\n$vpack = \\Velocypack\\Vpack::fromJson('{\"test\":\"abcde\", \"numbers\": [1234, 5678]}');\n\n// access subvalue on first layer\n$vpack-\u003eaccess(\"test\"); // string(5) \"abcde\"\n\n// access subvalue on deeper level\n$vpack-\u003eaccess([\"numbers\", 1]); // int(5678)\n\n$vpack-\u003eaccess(\"numbers\"); // array(2) {[0]=\u003eint(1234) [1]=\u003eint(5678)}\n\n```\n### Serializing a Vpack\n```php\n$vpack = \\Velocypack\\Vpack::fromArray([\"a\" =\u003e [123], \"b\" =\u003e [\"c\" =\u003e true]]);\n\n$vpack-\u003etoHex(); // 0x0b 0x13 0x02 0x41 0x61 0x02 0x04 0x20 0x7b 0x41 0x62 0x14 0x06 0x41 0x63 0x1a 0x01 0x03 0x09\n\n$vpack-\u003etoJson(); // {\"a\":[123],\"b\":{\"c\":true}}\n\n$vpack-\u003etoArray(); // [\"a\" =\u003e [123], \"b\" =\u003e [\"c\" =\u003e true]]\n\n$vpack-\u003etoBinary();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartin-schilling%2Fphp-velocypack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartin-schilling%2Fphp-velocypack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartin-schilling%2Fphp-velocypack/lists"}