vesoft-inc / nebula-php
A nebula client for PHP
Installs: 902
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 3
Forks: 2
Open Issues: 1
pkg:composer/vesoft-inc/nebula-php
Requires
- php: ^7.0 || ^8.0
- apache/thrift: ^0.15.0
This package is auto-updated.
Last update: 2025-09-28 16:18:34 UTC
README
Nebula PHP client.
Install with Composer
https://packagist.org/packages/vesoft-inc/nebula-php
composer require vesoft-inc/nebula-php
Quick Start
<?php require 'vendor/autoload.php'; $client = new Nebula\GraphClient("127.0.0.1", 9669); $client->authenticate("root", "1212"); $create = "CREATE SPACE IF NOT EXISTS test(vid_type=FIXED_STRING(30));"; $create .= "USE test;"; $create .= "CREATE TAG IF NOT EXISTS person(name string, age int);"; $create .= "CREATE EDGE like (likeness double);"; $client->execute($create); sleep(10); $client->execute('INSERT VERTEX person(name, age) VALUES "Bob":("Bob", 10), "Lily":("Lily", 9)'); $client->execute('INSERT EDGE like(likeness) VALUES "Bob"->"Lily":(80.0);'); $client->execute('FETCH PROP ON person "Bob" YIELD vertex as node'); $client->execute('FETCH PROP ON like "Bob"->"Lily" YIELD edge as e'); $client->execute('DROP SPACE test');
License
Nebula PHP is under Apache2.0 license.