GraphAware PHP Client

We use the GraphAware PHP Client at Graph Story for many applications. It's very powerful and well-supported.

You can install it with composer:

composer require graphaware/neo4j-php-client:^4.0

Use it in your code like so:

require_once "vendor/autoload.php";

use GraphAware\Neo4j\Client\ClientBuilder;

$client = ClientBuilder::create()
    ->addConnection("bolt", "bolt://")
$query = "MATCH (n:Person)-[:FOLLOWS]->(friend) RETURN, collect(friend) as friends";
$result = $client->run($query);

foreach ($result->getRecords() as $record) {
    echo sprintf(
        "Person name is : %s and has %d number of friends",

Other PHP libraries

More information on using Neo4j with PHP

Did this answer your question?