protected static function stripPhpTag($script)
    {
        $script = trim($script);
        $tagOpen = strtolower(substr($script, 0, 5));
        $tagClose = substr($script, strlen($script)-2);

        if('<?php' === $tagOpen){
            $script = substr($script, 5);
        }
        if('?>' === $tagClose){
            $script = substr($script, 0, (strlen($script)-2));
        }

        return $script;
    }
protected static function stripPhpTag($script)
    {
        $script = trim($script);
        $tagOpen = strtolower(substr($script, 0, 5));
        $tagClose = substr($script, strlen($script)-2);

        if('<?php' === $tagOpen){
            $script = substr($script, 5);
        }
        if('?>' === $tagClose){
            $script = substr($script, 0, (strlen($script)-2));
        }

        return $script;
    }
protected static function stripPhpTag ( $ script ) { $ script = trim ( $ script ) ; $ tagOpen = strtolower ( substr ( $ script , 0 , 5 ) ) ; $ tagClose = substr ( $ script , strlen ( $ script ) - 2 ) ; if ( '<?php' === $ tagOpen ) { $ script = substr ( $ script , 5 ) ; } if ( '?>' === $ tagClose ) { $ script = substr ( $ script , 0 , ( strlen ( $ script ) - 2 ) ) ; } return $ script ; }
Removes any <?PHP tags.

@param $script

@return mixed|string
Removes any <?PHP tags .