Skip to content

Deprecate targeting a switch by continue#3323

Closed
nikic wants to merge 1 commit intophp:masterfrom
nikic:deprecate-continue-on-switch
Closed

Deprecate targeting a switch by continue#3323
nikic wants to merge 1 commit intophp:masterfrom
nikic:deprecate-continue-on-switch

Conversation

@nikic
Copy link
Copy Markdown
Member

@nikic nikic commented Jun 24, 2018

Break should be used instead.
@nikic nikic added the RFC label Jun 24, 2018

if (CG(context).brk_cont_array[cur].is_switch) {
zend_error(E_DEPRECATED,
"Continues targeting switch are deprecated, use break instead");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick: it took me a second thought to grasp the error message. Wouldn't is be better expressed as “continue targeting switch is deprecated, use break instead”?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, that would be better.

@nikic
Copy link
Copy Markdown
Member Author

nikic commented Jul 5, 2018

Closing in favor of #3364.

@nikic nikic closed this Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants