-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Storing the graph in memory is pretty simple and I'd be surprised if PHP didn't have some kind of library for graph storage. For reference, there is a really good Python library for graphs called NetworkX that I used extensively a few years ago in a project. I would recommend playing around with it, since it has a great API and a lot of useful features and it might help you get a better feel for the problem.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.