Hello list!

This is an item that has been repeatedly requested in various forms,
with no solid implementation to back it up, yet remaining quite
desirable to the developer community at large.

Loops with a default block, executed in the event that the loop is
never entered.

https://wiki.php.net/rfc/loop_or

Traditionally this is requested as a loop {} else {} structure,
however due to the choice of keyword this causes significant BC
problems.

I have written an RFC presenting this feature as loop {} or {} along
with how I intend to implement it. I have consulted with several core
contributors as well as normal developers, and this seems to be the
most BC-complete option.

A poll of local developers indicates a strong positive response
supporting this feature, so please take the time to consider and
discuss what is laid out in the RFC, as many of us would like this to
become a permanent fixture of the language.

I especially need input regarding Opcache concerns, as this is not an
area of expertise for me.

I will be developing the patch myself, and hope to have a full proof
of concept completed by the end of this weekend. (for and while are
both working, foreach currently segfaults, I am working on it)

Thanks for reading.

Leigh.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to