PHP - not detecting the correct PHP version

First time user here, not a sysadmin.

I tried to install the PHP SDK per the instructions

php composer.phar require sentry/sdk

Using version ^2.2 for sentry/sdk
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sentry/sentry 2.5.0 requires php ^7.1 -> your PHP version (5.6.36) does not satisfy that requirement.
    - sentry/sdk 2.2.0 requires sentry/sentry ^2.5 -> satisfiable by sentry/sentry[2.5.0].
    - Installation request for sentry/sdk ^2.2 -> satisfiable by sentry/sdk[2.2.0].

Installation failed, reverting ./composer.json to its original content.

my phpinfo() is showing me PHP Version 7.2.28

Any idea what’s going on here and how can I install Sentry?

Thanks