3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str1 = 'The Quick Brown Fox Jumps'; $str2 = 'The Quick Brown Fox JuMps'; echo 'String1-'.$str1.'<br />String2-'.$str2.'<br />'; $spos = strspn($str1 ^ $str2, "\0"); printf('First difference at position %d: "%s" vs "%s"',$spos, $str1[$spos], $str2[$spos]); ?>
Output for 4.3.2 - 7.1.0
String1-The Quick Brown Fox Jumps<br />String2-The Quick Brown Fox JuMps<br />First difference at position 22: "m" vs "M"
Output for 4.3.0 - 4.3.1
String1-The Quick Brown Fox Jumps<br />String2-The Quick Brown Fox JuMps<br /> Notice: Uninitialized string offset: 25 in /in/8S80i on line 6 Notice: Uninitialized string offset: 25 in /in/8S80i on line 6 First difference at position 25: "" vs ""