Function Equals([ZObject] $objA, [ZObject] $objB) {}
To me, it would be more readable and more closely match the traditional documentation format people are used to if the [] encase the whole parameter as in:
function Equals([ZObject $objA[, ZObject $objB]])
Adding this in would be pretty simple, it would mean changes to zend_language_parser.y along these lines:
from:
parameter_list:
non_empty_parameter_list
| /* empty */
;to (minus the engine stuff):
parameter_list:
non_empty_parameter_list
| non_empty_parameter_list optional_parameter_list
| /* empty */
;optional_parameter_list:
'[' T_STRING T_VARIABLE ']'
| '[' T_STRING T_VARIABLE optional_parameter_list_comma ']'
;optional_parameter_list_comma:
'[' ',' T_STRING T_VARIABLE ']'
| '[' ',' T_STRING T_VARIABLE optional_parameter_list_comma ']'
;Greg
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
