break operator accepts only positive integers

Description

break indicates the number of nested loop to break from. The minimum is 1. 0 would be a no operation, and shall be skipped. Negative numbers or decimals make no sense.

Example

<?php

$a = [];
foreach($a as $b) {
    break 0;

}

Solutions

  • Remove the continue command.

  • Remove the 0.