Hello There,
I've been working with React, Flutter and Firebase related projects for more than 2 years for now. Therefor with the given specs, I'd suggest you the best way to implement this project is using firebase with the help of flutter, if it's a mobile app and Reactjs, if it's webapp. With having an enormous amount of library support of NPM I'd advice use js framework over PHP. Drop me a message and we'll talk further.
Thanks.