- strpos: documentation ( source)
<?php
function endsWith($haystack, $needle) {
// search forward starting from end minus needle length characters
return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);
}
$url = 'http://otmane.org/?mlb_t=';
echo $this->endsWith($url,'mlb_t=');