https://github.com/sjinks/php_nestinglevel
PHP extension to control maximum function nesting level
https://github.com/sjinks/php_nestinglevel
php php-extension stack-overflow
Last synced: 10 months ago
JSON representation
PHP extension to control maximum function nesting level
- Host: GitHub
- URL: https://github.com/sjinks/php_nestinglevel
- Owner: sjinks
- License: mit
- Created: 2016-12-16T17:52:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T13:47:28.000Z (about 1 year ago)
- Last Synced: 2025-03-24T02:22:44.264Z (10 months ago)
- Topics: php, php-extension, stack-overflow
- Language: C
- Homepage:
- Size: 136 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-nestinglimit
[](https://github.com/sjinks/php_nestinglevel/actions/workflows/test.yml) [](https://codecov.io/gh/sjinks/php_nestinglevel) [](https://scan.coverity.com/projects/sjinks-php_nestinglevel)
PHP extension to control maximum function nesting level, and not let PHP crash with segmentation fault due to infinite recursion.
Tested with PHP 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 nightly (currently, it's 8.5)
## Installing/Configuring
```bash
phpize
./configure
make
sudo make install
```
Then you will need to add a line like this to your `php.ini`:
```
extension=nl.so
```
or, for Windows,
```
extension=nl.dll
```
## INI settings
* `nl.max_level`: maximum nesting level. Negative value or zero turns the extension off.
* integer, defaults to -1 (disabled)
* PHP_INI_ALL
### More Information
Please see [tests](https://github.com/sjinks/php_nestinglevel/tree/master/tests) for usage examples.