Replace php_sapi_name() with PHP_SAPI

Change-Id: I222789cacaa2653c4dac62708ce228674c90af4c