<?php
if (!function_exists('substri_count')) {
/**
* Check the number of times a needle is found in a haystack
*
* @param (string) $haystack | (string) $needle
* @return (integer)
*/
function substri_count($haystack, $needle)
{
return substr_count(strtoupper($haystack), strtoupper($needle));
}
}