Hi PHP Mailing list,

My username is vvolynets.

I have an idea which will save a lot of code. I am proposing to add":

return when [condition], [return value];

This construct will remove a lot of ifs statements after method calls. For
example:

$result = Class->method();
if (!$result['success']) {
    return $result;
}

This becomes:
return when !$result['success'], $result;

Any thoughts?

Regards
Volodymyr Volynets

Reply via email to