On Mon, 2004-10-18 at 22:09, Robert Silva wrote: > Based on the issues you listed, how about: > > function Method((MyClass) $obj); > function Method([MyClass] $obj); > > Surrounding the class type in () or [] thereby marking it as optional. > Much like you would do when commenting a function to take an optional > parameter.
I like this idea and just for the sake of consideration and to elaborate on it: function Method( [MyClass,YourClass,null,bool] $obj ); which would allow all of the above types as values for $obj. Which would allow a great deal of flexibility while retaining a good deal of readability. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php