Named Parameters in PHP  Posted: 2013-09-01 Category: PHP
Update 06/09/2013: I had initially offered to put together an
RFC draft updating the original rather dire efforts at
documenting PHP's lack of interest for named parameters. A more
objective RFC has now been put together by Nikita Popov so I can
ditch my notes. Wonderful._  Converting a Python Twitter API
package to PHP turned out to be more trouble than I initially
expected due to the usage of Python's named parameters. Here is
the converted function signature:  public function getFriends(
$user_id = null,      $screen_name = null,      $cursor = -1,
$skip_status = false,      $include_user_entities = false ) {
In Python a call to that method could look like this:
api.get_friends(screen_name="phpdrama",
include_user_entities=true)  Because PHP has no ability for
users to specify parameters and is instead done entirely based
on the definition order, it's going to look like this:
$api->getFriends(null, 'phpdrama', -1, false, true);  Everyth