- PHP 7 Tutorial
- PHP 7 - Home
- PHP 7 - Introduction
- PHP 7 - Performance
- PHP 7 - Environment Setup
- PHP 7 - Scalar Type Declarations
- PHP 7 - Return Type Declarations
- PHP 7 - Null Coalescing Operator
- PHP 7 - Spaceship Operator
- PHP 7 - Constant Arrays
- PHP 7 - Anonymous Classes
- PHP 7 - Closure::call()
- PHP 7 - Filtered unserialize()
- PHP 7 - IntlChar
- PHP 7 - CSPRNG
- PHP 7 - Expectations
- PHP 7 - use Statement
- PHP 7 - Error Handling
- PHP 7 - Integer Division
- PHP 7 - Session Options
- PHP 7 - Deprecated Features
- PHP 7 - Removed Extensions & SAPIs
- PHP 7 Useful Resources
- PHP 7 - Quick Guide
- PHP 7 - Useful Resources
- PHP 7 - Discussion
What is the use of ini_set() in PHP?
PHP allows the user to modify some of its settings mentioned in php.ini using ini_set(). This function requires two string arguments. The first one is the name of the setting to be modified and the second one is the new value to be assigned to it.
Not all the available options can be changed using ini_set(). There is a list of all available options in the appendix.
The new value for the option.
<?php ini_set('display_errors', '1'); ?>
Given the line of code will enable the display_error setting for the script if it’s disabled. We need to put the above statement, at the top of the script so that, the setting remains enabled till the end. Also, the values set via ini_set() are applicable, only to the current script. Thereafter, PHP will start using the original values from php.ini.
- Related Articles
- What is the use of the @ symbol in PHP?
- What is Practical Use of Reversed Set Operators in Python?
- What is the significance of ‘^’ in PHP?
- What is the meaning of ‘empty set’ in MySQL result set?
- How to set the alpha blending flag to use layering effects using imaglayereffect() function in PHP?
- What is the use of "is" keyword in C#?
- What is the universal set and complement of a set?
- What is the use of sinon.js?
- What is the use of NCHAR in MySQL?
- What is the use of %n in printf()?
- What is the use of cin.ignore() in C++?
- What is the use of $ErrorView in PowerShell?
- What is the use of Action in JSP?
- What is the use of tag in JSP?