Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could do that before short syntax:

    foo(array('source' => '/123', 'destination' => '/abc'));
Short syntax will make it less repetitive though. You can also use something like array_merge to emulate jQuery's $.extend for creating defaults.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: