Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <?php function myFamily(...$firstname, $lastname) { $txt = ""; $len = count($firstname); for($i = 0; $i < $len; $i++) { $txt = $txt."Hi, $firstname[$i] $lastname.<br>"; } return $txt; } $a = myFamily("Doe", "Jane", "John", "Joey"); echo $a; ?> </body> </html>
PHP Fatal error: Only the last parameter can be variadic in /home/KfRGPk/prog.php on line 6