Hi,
I'd need a function where an optional argument takes on the value of another argument when it's not specified. I'd like to be able to write:
function some_fun ($a, $b, $c, $d=$b) {
...
However, this is not correct PHP syntax. I'd really like it to be, and may suggest it as an enhancement.
Instead, as $d is a string I thought of doing a bit of a workaround like:
function some_fun ($a, $b, $c, $d='COPY $b') {
if ($d = 'COPY $b') {$d = $b;}
...
Not as elegant as having PHP language support, but it'll do for now.
Anyone else needed this?