Replace php_sapi_name() with PHP_SAPI

Change-Id: Icc227d0fb317d54b4bb3918b797154988e5d70d7