src/Arvici/Heart/Tools/DebugBarHelper.php
private static function injectHtml($html, $code, $before)
    {
        $pos = strripos($html, $before);
        if ($pos === false) {
            return $html.$code;
        }
        return substr($html, 0, $pos).$code.substr($html, $pos);
    }
private static function injectHtml($html, $code, $before)
    {
        $pos = strripos($html, $before);
        if ($pos === false) {
            return $html.$code;
        }
        return substr($html, 0, $pos).$code.substr($html, $pos);
    }
private static function injectHtml ( $ html , $ code , $ before ) { $ pos = strripos ( $ html , $ before ) ; if ( $ pos === false ) { return $ html . $ code ; } return substr ( $ html , 0 , $ pos ) . $ code . substr ( $ html , $ pos ) ; }
Inject html code before a tag.

@param string $html
@param string $code
@param string $before

@return string
Inject html code before a tag .