PHP and Javascript framebreaker

<?php
if($_SERVER['PHP_SELF'] != "/index.php") {
echo '<script language="javascript" type="text/javascript">
<!--
	window.onload = function() {
		if (top.location != location) {
			top.location.href = document.location.href ;
		}
	}
//-->
</script>';
}
?>