3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('~a(?=\Kb)~', 'abc', $matches); print_r($matches); preg_match('~a(?=b\K)~', 'abc', $matches); print_r($matches);
Output for 8.5.0
Warning: preg_match(): Compilation failed: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) at offset 8 in /in/W9s8q on line 3 Warning: preg_match(): Compilation failed: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) at offset 8 in /in/W9s8q on line 6
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15
Array ( [0] => ) Warning: preg_match(): Get subpatterns list failed in /in/W9s8q on line 6 Array ( )

preferences:
76.36 ms | 408 KiB | 5 Q