RemarkupBlockRule has a getPriority() method which is used to sort block rules in PhutilRemarkupEngine near line 44:
However, msort() is not stable, and the stability behavior changed between PHP5 and PHP7. Many block rules have the same priority. This can cause behavioral differences between the runtimes; see rPHUc0370f2f3c.
We should either use a stable sort (msortv()), require block rules to disambiguate their priorities to moot the issue, or maybe both (stabilize the sort, disambiguate first-party rules, let third-party rules go crazy?).