3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '--'; $doesNotMatchInPhp7 = '/(?|(---)|(-))\1/'; $matchesInPhp7 = '/(?|(-)|(---))\1/'; var_dump(preg_match($doesNotMatchInPhp7, $string)); var_dump(preg_match($matchesInPhp7, $string));

preferences:
66.55 ms | 402 KiB | 5 Q