php-src/Zend/tests/exceptions/exception_025.phpt
DanielEScherzer 275f63e7fd
Zend/tests: organize some tests with subdirectories (2) (#16423)
Move more low-hanging fruit, creating new directories for the tests for:

* comparisons
* dynamic calls
* error messages
* `error_reporting()`
* exceptions
* `foreach()`
* garbage collection
* group `use` statements
* heredoc and nowdoc
* `goto` jumps
* late static binding
* magic methods
* namespaces
* numeric literal separators
* objects
* `settype()`
* cleaning of temporary values
* `unset()`

Additionally, move some tests into the existing subdirectory for `list()`
tests.

Drive-by fixes of some test numbers in the names of the `goto` tests.

Work towards GH-15631
2024-10-14 12:14:42 +01:00

41 lines
909 B
PHP

--TEST--
zend.exception_string_param_max_len ini setting
--FILE--
<?php
function main($arg) {
echo (new Exception()), "\n";
}
var_dump(ini_set('zend.exception_string_param_max_len', '-1'));
var_dump(ini_set('zend.exception_string_param_max_len', '1000001'));
var_dump(ini_set('zend.exception_string_param_max_len', '1000000'));
var_dump(ini_set('zend.exception_string_param_max_len', '20'));
main('short');
main('123456789012345678901234567890');
var_dump(ini_set('zend.exception_string_param_max_len', '0'));
main('short');
main('');
?>
--EXPECTF--
bool(false)
bool(false)
string(2) "15"
string(7) "1000000"
Exception in %s:%d
Stack trace:
#0 %s(10): main('short')
#1 {main}
Exception in %s:%d
Stack trace:
#0 %s(11): main('12345678901234567890...')
#1 {main}
string(2) "20"
Exception in %s:%d
Stack trace:
#0 %s(13): main('...')
#1 {main}
Exception in %s:%d
Stack trace:
#0 %s(14): main('')
#1 {main}