➤ PHP supports variable length argument function. It means you can pass 0, 1 or n number of arguments in function. To do so, you need to use 3 ellipses (dots) before the argument name. For instance:
function print_arr(...$numbers) {  
    foreach ($numbers as $element) {  
        echo $element."\n";  
    }  
}  
echo print_arr(1, 2, 3, 4);  
// outputs :   1 2 3 4
by Levani Makhareishvili
2 years ago
PHP
Function
1
Pro tip: use ```triple backticks around text``` to write in code fences