1--TEST-- 2Required parameter not passed 3--FILE-- 4<?php 5 6function test($a, $b, $c, $d) { 7} 8 9try { 10 test(a: 'a', d: 'd'); 11} catch (ArgumentCountError $e) { 12 echo $e->getMessage(), "\n"; 13} 14 15try { 16 array_keys(strict: true); 17} catch (ArgumentCountError $e) { 18 echo $e->getMessage(), "\n"; 19} 20 21try { 22 array_keys([], strict: true); 23} catch (ArgumentCountError $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27// This works fine, as search_value is explicitly specified. 28var_dump(array_keys([41, 42], filter_value: 42, strict: true)); 29 30?> 31--EXPECT-- 32test(): Argument #2 ($b) not passed 33array_keys(): Argument #1 ($array) not passed 34array_keys(): Argument #2 ($filter_value) must be passed explicitly, because the default value is not known 35array(1) { 36 [0]=> 37 int(1) 38} 39