Hi,
Has anybody had any experience with writing a function that takes an
optional parameter (a parameter with a default value) that is a
complex object? Can this be done or is it just primitive types?
For example, the following function works:
function do_something( $args=array() )
{
// do something
}
whereas this function does not appear to work..
function do_something( $args = new ArgumentObject() )
{
// do something
}
Am I trying to achieve the impossible?
And yes, I am aware that the PHP manual page says scalar values.. (
http://nz.php.net/manual/en/functions.arguments.php
) but I wondered whether anybody has achieved what I am after :-)
Thanks,
Phil
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---