substr_compare()

It compares two strings from a specified start position

Example

<?php
echo substr_compare(“phpcodexc”,”phpcode”,0);
?>

Output

2

Share