<?php
// Load composer
require '/phplibs/vendor/autoload.php';
// Instantiate the client with the project api_token and sender_id.
$client = new \Fcm\FcmClient("server token","sender ID);
// Instantiate the push notification request object.
$notification = new \Fcm\Push\Notification();
// Enhance the notification object with our custom options.
$notification
->addRecipient("user token")
->setTitle('Hello from php-fcm!')
->setBody('Notification body');
// Send the notification to the Firebase servers for further handling.
var_dump($client->send($notification));