xref: /PHP-8.2/Zend/tests/exception_025.phpt (revision 07db6415)
1--TEST--
2zend.exception_string_param_max_len ini setting
3--FILE--
4<?php
5
6function main($arg) {
7    echo (new Exception()), "\n";
8}
9var_dump(ini_set('zend.exception_string_param_max_len', '-1'));
10var_dump(ini_set('zend.exception_string_param_max_len', '1000001'));
11var_dump(ini_set('zend.exception_string_param_max_len', '1000000'));
12var_dump(ini_set('zend.exception_string_param_max_len', '20'));
13main('short');
14main('123456789012345678901234567890');
15var_dump(ini_set('zend.exception_string_param_max_len', '0'));
16main('short');
17main('');
18
19?>
20--EXPECTF--
21bool(false)
22bool(false)
23string(2) "15"
24string(7) "1000000"
25Exception in %s:%d
26Stack trace:
27#0 %s(10): main('short')
28#1 {main}
29Exception in %s:%d
30Stack trace:
31#0 %s(11): main('12345678901234567890...')
32#1 {main}
33string(2) "20"
34Exception in %s:%d
35Stack trace:
36#0 %s(13): main('...')
37#1 {main}
38Exception in %s:%d
39Stack trace:
40#0 %s(14): main('')
41#1 {main}
42