In the following snippet, how does printPhrase
know if the passed arguments are $a
and $b
(so it uses default value of $c
, or $a
and $c
(so it uses default value of $b
)?
private function printPhrase ($a, $b='black', $c='candle!' ) {
echo $a . $b . $c; //Prints A black cat! or A black candle!
}
private function callprintPhrase () {
printPhrase('A ', ' cat!');
}