3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attr = '@C_1_2=Client'; $d = 'C_1_2: Client'; if (preg_match('/\@(.*)=(.*)/', $attr, $matches)) { // check corresponding values $tmp_attr = trim($matches[1]); $tmp_value = trim($matches[2]); if (preg_match("/$tmp_attr:$tmp_value/", $d)) { echo 'yes'; break; } }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
Fatal error: 'break' not in the 'loop' or 'switch' context in /in/ZCoYV on line 11
Process exited with code 255.

preferences:
172.15 ms | 1395 KiB | 35 Q