Guys I have been using the following code quite often but haven't properly understood the exact semantics of the functions. Especially for the last two str_replace functions. Can anybody explain me whats exactly happening here(in a little detail)?
$this_file = str_replace('\\', '/', __FILE__);
$doc_root = $_SERVER['DOCUMENT_ROOT'];
$web_root = str_replace(array($doc_root, 'application/config.php'), '', $doc_root);
$srv_root = str_replace('application/config.php', '', $doc_root);