1--TEST-- 2ini_set() accepts non-strings under strict_types 3--FILE-- 4<?php 5declare(strict_types=1); 6 7ini_set('docref_root', null); 8var_dump(ini_get('docref_root')); 9ini_set('html_errors', true); 10var_dump(ini_get('html_errors')); 11ini_set('html_errors', false); 12var_dump(ini_get('html_errors')); 13ini_set('precision', 6); 14var_dump(ini_get('precision')); 15 16// There are no float options in always enabled extensions. 17// Just use a random string property, even though it doesn't make sense. 18ini_set('user_agent', 3.14); 19var_dump(ini_get('user_agent')); 20 21try { 22 ini_set('foo', []); 23} catch (TypeError $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27?> 28--EXPECT-- 29string(0) "" 30string(1) "1" 31string(0) "" 32string(1) "6" 33string(4) "3.14" 34ini_set(): Argument #2 ($value) must be of type string|int|float|bool|null 35