--- pecl/trader/trunk/tests/trader_bbands_01.phpt 2021/01/17 21:07:36 352308 +++ pecl/trader/trunk/tests/trader_bbands_01.phpt 2021/01/18 07:21:15 352309 @@ -3,6 +3,8 @@ --SKIPIF-- = 80000) die ("skip PHP 7 only"); +?> --INI-- trader.real_precision=3 --FILE-- @@ -1464,4 +1466,4 @@ [251]=> float(2.6519196935811E+37) } -} \ No newline at end of file +} --- pecl/trader/trunk/tests/trader_ini_01.phpt 2021/01/17 21:07:36 352308 +++ pecl/trader/trunk/tests/trader_ini_01.phpt 2021/01/18 07:21:15 352309 @@ -35,7 +35,12 @@ ini_set('trader.real_round_mode', 'schnitzel'); var_dump(ini_get('trader.real_round_mode')); -ini_set('trader.real_round_mode', array()); +try { + // Hide warning for PHP 7 + @ini_set('trader.real_round_mode', array()); +} catch (TypeError $e) { + // Hide exception for PHP 8 +} var_dump(ini_get('trader.real_round_mode')); ini_set('trader.real_round_mode', 42); @@ -55,8 +60,6 @@ Warning: ini_set(): Invalid value 'schnitzel' for trader.real_round_mode in %strader_ini_01.php on line %d string(8) "half_odd" - -Warning: ini_set() expects parameter 2 to be string, array given in %strader_ini_01.php on line %d string(8) "half_odd" Warning: ini_set(): Invalid value '42' for trader.real_round_mode in %strader_ini_01.php on line %d