1--TEST-- 2Bug #40752 (parse_ini_file() segfaults when a scalar setting is redeclared as an array) 3--FILE-- 4<?php 5 6$file = dirname(__FILE__)."/bug40752.ini"; 7file_put_contents($file, ' 8foo = 1; 9foo[] = 1; 10'); 11 12var_dump(parse_ini_file($file)); 13 14file_put_contents($file, ' 15foo[] = 1; 16foo = 1; 17'); 18 19var_dump(parse_ini_file($file)); 20 21unlink($file); 22 23echo "Done\n"; 24?> 25--EXPECT-- 26array(1) { 27 ["foo"]=> 28 array(1) { 29 [0]=> 30 string(1) "1" 31 } 32} 33array(1) { 34 ["foo"]=> 35 string(1) "1" 36} 37Done 38