Commit 070e24d
committed
Allow all scalar types in ini_set()
This changes ini_set() to accept all scalar types
(string|int|float|bool|null) for the new value. The idea here is
that while the INI system ultimately works with strings, its value
interpretation is designed to be consistent with PHP's casting rules,
e.g. "1" and "" are interpreted as boolean true and false respectively.
I personally believe that writing ini_set('precision', 10) makes more
sense than ini_set('precision', '10'), and find strict_types to be
unnecessarily pedantic here.
Closes GH-6680.1 parent dcf3892 commit 070e24d
4 files changed
Lines changed: 56 additions & 9 deletions
File tree
- ext/standard
- tests/general_functions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2086 | 2086 | | |
2087 | 2087 | | |
2088 | 2088 | | |
2089 | | - | |
| 2089 | + | |
2090 | 2090 | | |
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
2094 | | - | |
| 2094 | + | |
2095 | 2095 | | |
2096 | 2096 | | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
2097 | 2102 | | |
2098 | 2103 | | |
2099 | 2104 | | |
| |||
2102 | 2107 | | |
2103 | 2108 | | |
2104 | 2109 | | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
2105 | 2113 | | |
2106 | 2114 | | |
2107 | 2115 | | |
| |||
2111 | 2119 | | |
2112 | 2120 | | |
2113 | 2121 | | |
2114 | | - | |
| 2122 | + | |
2115 | 2123 | | |
| 2124 | + | |
2116 | 2125 | | |
2117 | 2126 | | |
2118 | 2127 | | |
2119 | 2128 | | |
2120 | 2129 | | |
2121 | 2130 | | |
2122 | | - | |
| 2131 | + | |
2123 | 2132 | | |
2124 | | - | |
| 2133 | + | |
2125 | 2134 | | |
| 2135 | + | |
2126 | 2136 | | |
2127 | 2137 | | |
2128 | 2138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
498 | 501 | | |
499 | 502 | | |
500 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments