Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

PHP 7.3 Compat: Continue Targeting Switch issues Warning #372

Closed
trepmal opened this issue Jan 10, 2019 · 1 comment
Closed

PHP 7.3 Compat: Continue Targeting Switch issues Warning #372

trepmal opened this issue Jan 10, 2019 · 1 comment

Comments

@trepmal
Copy link

trepmal commented Jan 10, 2019

Hi,

I was scanning a different codebase for PHP 7.3, and came across these:






if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; continue; }

if ($matched) { continue; }

if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { continue; }


continue statements targeting switch control flow structures will now generate a warning. In PHP such continue statements are equivalent to break, while they behave as continue 2 in other languages.

http://php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.continue-targeting-switch

At a glance, it looks like these can be changed to break, but I'll admit I haven't tested this case.

@trepmal
Copy link
Author

trepmal commented Jan 10, 2019

Ah, I missed the abandonment notice in #371

For those stumbling across this, it's fixed in the fork Asenar@b56f7bb#diff-cd3ec84e97521abdea4b5c455448c3b9

@trepmal trepmal closed this as completed Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant