PHP quick start

PHP client guide

Learn how to create a PHP application that connects to the Memgraph database and executes simple queries.

Community-contributed library PHP Bolt driver by Michal Štefaňák is the most commonly used to connect to Memgraph with PHP via Bolt protocol. Memgraph and Neo4j both support Bolt protocol and Cypher queries, which means that same client can be used to connect to both databases. This is very convenient if switching between the two databases is needed.

Quickstart

The following guide will demonstrate how to start Memgraph, connect to it, seed the database with data, and run simple read and write queries with the PHP Bolt client.

The necessary prerequisites that should be installed in your local environment are:

Node.jsPython