The process control commands break and continue in PHP are parsed. The break and continue process control commands in PHP are parsed into 0a0, b0b0, c0c0, d0d0, e0e0 ,); * ******** break ******** is used to jump out of the current execution cycle, and does not continue to execute the parsing of the break and continue control commands in PHP.
'0a0 ',' B '=> '0b0', 'C' => '0c0', 'D' => '0d0 ', 'E' => '0e0 ',); // ******************* // this method jumps out of the current execution cycle and does not continue to execute the loop. Foreach ($ arr as $ k =>$ v) {if ($ k = 'C') {break;} $ arr2 [$ k] = $ v ;} var_dump ($ arr2);/* array (size = 2) 'a' => string '0a0 '(length = 3) 'B' => string '0b0' (length = 3) * // ******************* // immediately stop the current execution loop and return to the condition judgment of the loop, continue to the next loop. Foreach ($ arr as $ k =>$ v) {if ($ k = 'C') {// Ignore the processing of this item continue ;} $ arr3 [$ k] = $ v;} var_dump ($ arr3);/* array (size = 4) 'a' => string '0a0 '(length = 3) 'B' => string '0b0' (length = 3) 'D' => string '0d0' (length = 3) 'E' => string '0e0' (length = 3) */?>
Defaults 0a0, B => 0b0, c => 0c0, d => 0d0, e => 0e0 ,); // ******************* // this method jumps out of the current execution cycle and does not continue to execute the cycle...