I think this whole if/else should be split out according to what I've outlined in an earlier email:

```
static function mongo_cursor_insert_classic(INTERNAL_FUNC_PARAMS)
{
        /* do old stuff */
}

static function mongo_cursor_insert_wire_version_2(INTERNAL_FUNC_PARAMS)
{
        request_id = php_api_insert_single()
        if(w) {
                php_mongodb_api_get_write_results_for_request_id(request_id);
        } else {
                php_mongodb_api_get_write_results_callback(request_id, /dev/null)
        }
}

function mongo_cursor_insert(INTERNAL_FUNC_PARAMS)
{
        if (new_wire_version) {
                mongo_cursor_insert_wire_version_2(INTERNAL_FUNC_PARAMS_PASSTHRU);
        } else {
                mongo_cursor_insert_classic(INTERNAL_FUNC_PARAMS_PASSTHRU);
        }
}
```


Please also watch whitespace (space after `if(`, and alignment of `*` in comments).