Replace php_sapi_name() with PHP_SAPI

Change-Id: I6861ca68e195bce5573a756ddcde547d11588645