php.ini-development php.ini-production配置文件的不同区别

php.ini-development php.ini-production配置文件的不同区别

development:
    error_reporting = E_ALL
production:
    error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
E_ALL  ( integer ) E_STRICT 出外的所有错误和警告信息。
E_STRICT  ( integer ) 启用 PHP 对代码的修改建议,以确保代码具有最佳的互操作性和向前兼容性。
E_DEPRECATED  ( integer ) 运行时通知。启用后将会对在未来版本中可能无法正常工作的代码给出警告。

development:
    display_errors = On
production:
    display_errors = Off
显示错误信息 关闭错误信息

development:
    display_startup_errors = On
production:
    display_startup_errors = Off
是否显示PHP启动时的错误。即使display_errors指令被打开,关闭此参数也将不显示PHP启动时的错误。

development:
    track_errors = On
production:
    track_errors = Off
如果开启,最后的一个错误将永远存在于变量$php_errormsg中。

development:
    mysqlnd.collect_memory_statistics = On
production:
    mysqlnd.collect_memory_statistics = Off
Enable the collection of various memory statistics which can be accessed through mysqli_get_client_stats() ,  mysqli_get_connection_stats() ,  mysqli_get_cache_stats()  and are shown in mysqlnd  section of the output of the  phpinfo()  function as well.

development:
    zend.assertions = 1
production:
    zend.assertions = -1
When set to  1 , assertion code will be generated and executed (development mode). When set to  0 , assertion code will be generated but it will be skipped (not executed) at runtime. When set to  -1 , assertion code will not be generated, making the assetions zero-cost (production mode).

development:
    ;opcache.huge_code_pages=0
production:
    ;opcache.huge_code_pages=1
php7的的新特性   要配合opcache.so 默认是没开启