3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 endsWith($url,'mlb_t');
based on VrXA8
Output for 4.3.0 - 7.2.0