- strpos: documentation ( source)
- strtolower: documentation ( source)
<?php
$paddedContentType = ' ' . 'javascript';
$isJavascriptPresent = strpos(strtolower($paddedContentType), 'javascript');
if ($isJavascriptPresent !== false || $isJavascriptPresent == 0) {
echo 'yeah its there';
}