Raise an error to circleci from php script

Hello everyone,
I’ve created a PHP script that checks and install database updates.
How may I return an error to CircleCI if something goes wrong?

circle.yml command:
ssh centos@somehost "sudo php /var/www/html/somewebpage/upgrade.php"

If you have your script return a non-zero error number CircleCi will detect it as a failure