Browse Source

Updated the example code

main
Cédric Belin 3 months ago
parent
commit
39e0380baa
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      example/main.php

+ 3
- 3
example/main.php View File

@@ -8,11 +8,11 @@ function main(): void {
// For example: new Client("12345678", "a9BkVohJun4MAf")

$client->sendMessage("Hello World!");
echo "The message was sent successfully.";
print "The message was sent successfully.";
}

catch (Throwable $e) {
echo "An error occurred: ", $e->getMessage(), PHP_EOL;
if ($e instanceof ClientException) echo "From: ", $e->getUri(), PHP_EOL;
print "An error occurred: {$e->getMessage()}" . PHP_EOL;
if ($e instanceof ClientException) print "From: {$e->getUri()}" . PHP_EOL;
}
}

Loading…
Cancel
Save