php and parameter code example
Example 1: variable args php
function some_function(...$args): void {
$val1 = $args[0];
// Access as normal index array
}
Example 2: php optional parameter
function dosomething($var1, $var2, $var3 = 'somevalue'){
// Rest of function here...
}