3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function compare($left, $right) { if (($length = mb_strlen($left)) != mb_strlen($right)) { return false; } for ($i = 0, $result = 0; $i < $length; $i++) { $result |= ord($left[$i]) ^ ord($right[$i]); } return $result === 0; } var_dump(compare('Ð', 'Â'));
based on 2ooGZ
Output for 5.6.0 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.11
bool(true)
Output for 4.3.0 - 5.5.38
bool(false)