Various typos and tabs adjustments
Replace php_sapi_name() function with PHP_SAPI constant

exact same behavior but faster, shorter