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