Upgrading PHP version from 5.6 to 7.0.7 causes something wrong with comparisons.
For example, && and || operators in if block causes run of neither true block nor false, like I haven`t that IF at all.
Also there are some problems with ternary operator - sometimes it doesn`t work.
Rewriting all complex conditions with conjunction, disjunction or ternary to ( () * () != 0), ( () + () != 0) and IF operator solve an issue, and you can make your wiki much faster using PHP 7.0