History log of /PHP-8.2/ext/standard/tests/general_functions/ini_set_types.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 070e24d7 11-Feb-2021 Nikita Popov

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 ultim

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.

show more ...