I know it is possible to use optional arguments as follows:
function doSomething($do, $something = \"something\") {
}
doSomething(\"do\");
doSomething(\"do
PHP has no named parameters. You'll have to decide on one workaround.
Most commonly an array parameter is used. But another clever method is using URL parameters, if you only need literal values:
function with_options($any) {
parse_str($any); // or extract() for array params
}
with_options("param=123&and=and&or=or");
Combine this approach with default parameters as it suits your particular use case.