Hello, can I use this syntax under PHP 4 (default function parameter) :
function myFunction($arg1 = 'defaultValue') {}
Thanks.
Hello, can I use this syntax under PHP 4 (default function parameter) :
function myFunction($arg1 = 'defaultValue') {}
Thanks.
Yes you can. And it can be overwritten like this:
<?php
$var = 'one';
myFunction($var);
function myFunction($arg1 = 'defaultValue') {
echo $arg1;
}
?>
the output would be one