3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = "abcdefgh"; for ($i = 0, $len = mb_strlen($s)-1; $i < $len; $i++, $len--) { $s[$i] = $s[$i] ^ $s[$len]; $s[$len] = $s[$i] ^ $s[$len]; $s[$i] = $s[$i] ^ $s[$len]; } echo $s;
based on 2W3Ei
Output for 4.3.0 - 7.2.0
hgfedcba