- var_dump: documentation ( source)
- preg_match: documentation ( source)
- preg_last_error: documentation ( source)
- ini_set: documentation ( source)
<?php
ini_set("pcre.jit", 0);
$string = '--';
$doesNotMatchInPhp7 = '/(?|(---)|(-))\1$/';
$matchesInPhp7 = '/(?|(-)|(---))\1$/';
var_dump(preg_match($doesNotMatchInPhp7, $string));
var_dump(preg_last_error());
var_dump(preg_match($matchesInPhp7, $string));