繁星coding
我认为你误解了“严格”的论点。例如。in_array('3', [1, 2, 3, 4], true); // ==> false because the string '3' !== 3但是,如果您不传递第三个参数或传递它false:in_array('3', [1, 2, 3, 4]); // ==> true because '3' == 3in_array('3', [1, 2, 3, 4], false); // ==> true because '3' == 3但是,在您的情况下,即使使用loose,字符串也不匹配==:'/wp-content/uploads/2020/08/SJ-R42027-CZ-SG-1-scaled-1.jpg' == 'https://example.com/wp-content/uploads/2020/08/SJ-R42027-CZ-SG-1-scaled-1.jpg'// ==> false