Replace php_sapi_name() with PHP_SAPI

Change-Id: I61b35e34e8ccfa8e7f679e3792daee66ebc52209